I wish to access a variable I am setting in controller in the model. Imagine the following:
app/controllers/events.rb
...
@language = language_from_query_string
@events = Event.all
render "events"
...
app/models/event.rb
...
def title
self["title_#{<reference_to_current_controller>.language}".to_sym]
end
...
Anyway to do this?