Rails2.2.2, is it a bug?

yesterday, i make a demo with Rails2.2.2.

See: <http://wiki.rubyonrails.org/rails/pages/ReservedWords> -- the
"reported to cause trouble" section includes 'format'.

You might want to rename that attribute of your model.


Thank you.

I know the 'format' cause trouble, it's a private method , cause
stop calling method_missing,
   I change 'format' to 'formater' or other form, it's be fine.

but why this is good :

Did you mean: You got the error in the Model, but it was worked in the View?

Maybe you can try this in the Model:

self[:format] replace self.format

Thank you.
I know the issue. sefl[:format] is good.
but i dont' understand why it reported the error : "Attempt to call
private method" in View page, when i called show action.

I know the column 'format' will be cause trouble. beacuse all of
instance variable has the private method named 'format', right ?

but why it is good as following :

Same as the model
Change @release.format to @release[:format]
Cause format is a private method, so you can’t call it.
No matter it is in the model or in the view.
So, you can use model[:method] to grab the correct column.
Or, you can try to use: read_attribute(“format”) in the model :slight_smile:

Hi,Am Almas M totally new to this site i was jst going the site of Ruby’s on Rails i hav no idea how am i to begin with.It would be really gud if u guide and let me wht is it all about.



why i can call format in this page:

you can read <Agile Web Development With Rails 3rdEdition>