you can use a before_filter in the application controller.
in the method called by before_filter fetch the data you want from the
model and store the result in an instance variable, e.g. @message
create a partial that use this @message variable and insert it in your
application layout.

On 16 Nov, 22:19, Jamie <[email protected]> wrote:
> I've created a model that I plan to use to store messages that I want
> to be broadcast on every page of my application. I'm storing the
> message text, a class name for css styling, and a start and end
> timestamp that I want it to display between.
>
> I was trying to find a way to insert these items into my
> application.html.erb layout template so that I don't have to include
> something in every single view. There is also a controller set up for
> the message items. Hopefully someone can help me with this, let me
> know if you need any more info.
--~--~---------~--~----~------------~-------~--~----~
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