forget it guys, it was a before_filter :authorize that I forgot to eliminate
^^
thanks
--
anl
On Mon, Mar 8, 2010 at 12:23 AM, anler
<anler86-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> hi folks, I need help with something, I got a controller and I want be
> able to use a class method defined in ApplicationController as I do
> with (let say) the ''layout'' function
> I''m new in Rails and Ruby but I know enough CakePHP to be aware of
the
> conventions a stuff like that
>
> The way I''m doing it is creating a class method in
> ApplicationController called authorize
>
> #...ApplicationController
> def self.authorized what = []
> end
> #...
>
> and trying to do the following in (let say, BlogController)
> #...BlogController
> layout ''public''
>
> authorize :all
>
> def index
> end
> #...
>
> but I''m getting this error:
>
> undefined method `authorize'' for #<BlogController:0x23322bc>
>
> someone knows the right way of doing this?
>
> thanks
>
> --
> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To unsubscribe from this group, send email to
>
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.