On Sat, Feb 2, 2013 at 6:35 AM, Dave Castellano <[email protected]> wrote:

> Using update_scope_path in the view is routing to "users/show" rather
> than users/update_scope, with "update_scope" becoming the user id.
>
> ( The goal is to change session[:question_scope] to "vip" when the user
> clicks the button in the view. I assume I have to go to a controller
> action to do that.)

Yes.

> In routes.rb:

  resources :users

The above includes /users/:id, which *matches first* - winning! So
the routing engine won't ever get to your other route.

  match '/users/update_scope'

Reverse the order in routes.rb and try it.

-- 
Hassan Schroeder ------------------------ [email protected]
http://about.me/hassanschroeder
twitter: @hassan

-- 
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 [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to