Making it a before_filter makes it so you won't need to call the
method to set your banner every single time. It will be done before
any action is called.

On Jul 2, 12:25 pm, bingo bob <[email protected]> wrote:
> Aha !
>
> "You could put the @banner_url = BannerAdvert.. in you
> application_controller.rb. Make it a before_filter."
>
> That's the bit I missed then, I just stuck @banner_url =
> BannerAdvert.first in the application_controller.rb, I need a
> before_filter to call a method in that controller - that right ?
> --
> 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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to