Hello all.

I've got a model that basically records whever a user has completed an
action. When it's created it auto fills in the user_id via sessions
etc.

However I want to create links on the various actions, so users can
just click them, eg navigating possible actions with a button for
"complete!" and that will insert a value into the model for them.

<%= button_to "Complete!",user_actions_path,:action_id =>
action.id,  :method => :post %>

This posts the page correctly, however it complains that the action/
action_id is null (as i'm using validations in the model to stop this.
I've tried tweaking action_id to action and removing action.id etc.
But nothing works. Action id is a proper id too, but by the time rails
gets to it it's null...

I have no idea how to fix this too?. Anyone got any clues?

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to