List Info

Thread: Re: params checking in controller before real action




Re: params checking in controller before real action
user name
2008-02-23 20:38:36
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-talkgooglegroups.com
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )