On 17 November 2010 15:29, comopasta Gr <li...@ruby-forum.com> wrote:
> Hi, I'm a bit confused with this.
> If you follow the steps below in Rails 3:
>
> 1- rails new act -d mysql
> 2- rails g scaffold action name:string
> 3- rake db:create
> 4- rake db:migrate
> 5- rails server
>
> when I add a record to that app I get:
>
> INSERT INTO `actions` (`created_at`, `name`, `updated_at`) VALUES
> ('2010-11-17 15:23:53', NULL, '2010-11-17 15:23:53')
>
> Note that NULL for the name value. I use as valid string but there is
> goes as NULL.
>
> Do another scaffold named act and everything goes fine with no changes.
> I could imagine that action is a reserved word but shouldn't it complain
> about it?

According to the very useful page
http://wiki.rubyonrails.org/rails/pages/ReservedWords:

action – overwritten by Rails when used with form parameters (i.e. an
ActionsController expecting action[field_name] won't work)

I fell over this one myself a little time ago.  I ended up with Act model also.

Colin


>
> Any hints?
>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonrails-t...@googlegroups.com.
> To unsubscribe from this group, send email to 
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to