Class: Forgeos::ApplicationController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/forgeos/application_controller.rb

Instance Method Summary collapse

Instance Method Details

#notificationsObject



7
8
9
10
11
12
13
# File 'app/controllers/forgeos/application_controller.rb', line 7

def notifications
  @notifications = {}
  [:error, :notice, :warning].each do |key|
    @notifications[key] = flash[key] unless flash[key].blank?
  end
  render :json => @notifications.to_json
end