rubyonrailsin

A Ruby and Rails talk

Sunday, March 28, 2010


[Rails] Re: accepts_nested_attributes_for - issue

by rubyonrailsin 0 comments

Tag


Share this post:
Design Float
StumbleUpon
Reddit

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

Subscribe feeds via e-mail

Blog Archive