create action

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

create action

fugee ohu
Can i add attributes to set in create in addition to whateveer's in params list even if the additional attributes are the only source for attributes which are validated at the model level For me, headline is validated in the model but there's no headline field in the form, it gets created on the fly in the controller using the info from the other fields in the params list as @news_item.headline="whatever" where form is form_for(@news_item) and there's not going to be params[:news_item] sent to the controller

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/0e8829c1-599f-40eb-af52-dcff553c0680%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...