Hi Yehuda,

I'm trying to enable authentication for my whole application, except
for the "new" action of the Users controller. I have
"before :ensure_authenticated" in my application controller and
"skip_before :ensure_authenticated" in my Users controller. I wish I
could say something like "skip_before :ensure_authenticated, :only =>
[:new]". The problem is that skip_before does not take any action
arguments, so I wanted to write my own.

Thanks,
Tiberiu

On Mar 27, 7:03 pm, Yehuda Katz <[email protected]> wrote:
> What precisely are you trying to do? It sounds potentially like you could
> achieve what you want is a less generic way for your app.
>
> -- Yehuda
>
>
>
> On Sat, Mar 28, 2009 at 1:50 AM, Mr_Tibs <[email protected]> wrote:
>
> > Hi,
>
> > I'm trying to overwrite skip_before() of Merb::AbstractController -
> > currently it doesn't take in :only & :exclude => :action.
> > So, if I have the following code:
>
> > class Merb::AbstractController
> >  def self.skip_before(filter, action)
> >    if self.action_name == action
> >      skip_filter(self._before_filters , filter)
> >    end
> >  end
> > end
>
> > Where in the merb-app directory structure do I put it? Why is it
> > generating an error on self.action_name?
>
> > Thanks,
> > Tiberiu
>
> --
> Yehuda Katz
> Developer | Engine Yard
> (ph) 718.877.1325
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"merb" 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/merb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to