Yes, you are correct. Terrible naming. But was done to try quick
example. I am creating new player so
@cpr it won't find player because I am in fact creating one. I
know... terrible code.
It seems to be looking for Active Record object and I am passing in
array...
Help!
On Mar 28, 6:08 am, Art Shayderovtry <ashayde...@gmail.com> wrote:
> It's rather unusual to name the action 'index' when it shows form for
> creating a new object. Why not call it 'new' or something like that.
> And then the action is named 'update_player' when in fact it is
> creating a new Player object. Why don't you name it 'create'?
> I'm sorry for nitpicking but choosing the right names will make your
> life easier. (and will raise your chances for getting the answer)
>
> Regarding your question. I usually look at params in such a situation.
> You can find request params in webserver log(just scroll console
> window where webrick is started) or you can insert a call to
> 'debugger' in the action and start webserver in debug mode (with '--
> debugger').
--
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-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment