Hello!

We're using Rails for most of our projects and during last few years we've 
been developing CMS on top of Rails.
What we need is to somehow separate CMS notices from rest of the app 
notices, because CMS notices can have different format than app notices.

Some clarification: CMS itself isn't rails app, you just use it's classes 
to extend you own controllers.


Right now we developed monkey patch for this, however we'd like to have 
this feature implemented upstream.

Here's how it could be implemented:

In ActionDispatch::Flash create class method session_key that accepts 
environment and return string used as key to store/retreive flash data 
to/from session.

By default ActionDispatch::Flash.session_key could:
a) always return 'flash'
b) query target controller for flash key

in case of *a* those who would be interested in this feature would need to 
monkey patch ActionDispatch::Flash.session_key to fit their needs.
In case of *b* there would be mechanism to override default flash key in 
controller (controller class method), that gets queried by 
ActionDispatch::Flash.session_key.

I'd prefer b. What do you think?


I'll post you our monkey patch so you get better understanding, what I mean
http://pastie.org/9279686

P.S.
I'm ready to write and submit code, I just wanted to get some feedback 
before I do.

--
Aldis Berjoza

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.

Reply via email to