Ruby on Rails Tuesday, April 25, 2017

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
To post to this group, send email to
To view this discussion on the web visit
For more options, visit

No comments:

Post a Comment