It is not supposed to work this way, accessing instance
methods in
scope of class never worked.
If you'll describe in more details what are you trying to
accomplish,
you definitely will be taken care of.
On 24 ΖΕΧ, 03:22, Jerry Liu <rails-mailing-l... andreas-s.net> wrote:
> I want to perform certain action in controller based on
request
> parameters. Is there some way to access params in
controller before a
> real action? Like in following code:
>
> class UsersController < ApplicationController
>
> # params[:type] in here does not work
> ssl_required :create if
params[:type]=="something"
>
> def create
> # params[:type] works in here.
> end
> end
>
> If not, what's the best way to do this?
> --
> Posted viahttp://www.ruby-forum.com
/.
--~--~---------~--~----~------------~-------~--~----~
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 rubyonrails-talk googlegroups.com
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe googlegroups.com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
|