Ruby on Rails
Tuesday, December 30, 2014
Hi guys,
-- I need some help with updating an array using rails view form .
In controller
def foo_params
params.require(:foo).permit(:value,:rvalue)
end
where rvalue is an array. I've tried :rvalue=>[] but no luck
In form I have
<%= form_for :foo, url: foo_path(@foo.foo_value, @foo), method: :put, html: {class: 'uk-form'} do |builder| %>
.....
<%= builder.label "rvalue", "Value" %>
<%= builder.text_field "rvalue" , class: "uk-width-1-1" %>
Can you please help?
Thanks
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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/d3bc9f1c-9ede-4daf-8ee6-d4c095dcd69c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment