Ruby on Rails
Tuesday, November 4, 2014
Hey Dave,
Before any controller action use "raise params.inspect ", you will get parameters coming from Form. You have to use that parameters only .
In your case just add this line in edit action (Edit Method) "raise params.inspect". you will get all parameters.
On Mon, Nov 3, 2014 at 7:19 PM, Dave Castellano <lists@ruby-forum.com> wrote:
Matt Jones wrote in post #1161637:
> On Sunday, 2 November 2014 20:57:43 UTC-5, Ruby-Forum.com User wrote:
>> ...
>> <%= f.submit 'Update', :class => 'btn btn-primary' %>
>> ...
>> <% end %>
>>
>> @profile contains #<Profile:0x00000104c26398> as it should.
>>
>> routes contains: resources :profiles and the resulting routes appear OK
>>
>>
> From the route it's generating, I suspect you have a `resource :profile`
> someplace above this. That matches the controller actions you're
> showing,
> which use `current_user.id` instead of `params[:id]`. You'll likely need
> to
> specify the URL explicitly to `form_for`.
>
> --Matt Jones
Thank you, specifying the URL did it nicely!
Dave
--
Posted via http://www.ruby-forum.com/.
--
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/5c4d48bf605038b7c434b6869f19f4a9%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.
----------------------------------------------------------------------------------------------------
Thank You.
Best Wishes,
BalaRaju Vankala,
8886565300.
Thank You.
Best Wishes,
BalaRaju Vankala,
8886565300.
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/CAGQ0aie8pcjAACAgvj--yysSAhuKT3q6G739T1TypQXtt745Uw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment