app/controllers/bhf/application_controller.rb in bhf-0.9.4 vs app/controllers/bhf/application_controller.rb in bhf-0.9.5
- old
+ new
@@ -32,11 +32,11 @@
@current_account
end
def get_account_roles(area = nil)
return unless current_account
-
+
if area
if current_account.respond_to?(:bhf_area_roles)
return current_account.bhf_area_roles(area).collect(&:identifier)
end
end
@@ -51,11 +51,11 @@
@settings = Bhf::Settings::Base.new(yaml_parser.settings_hash, current_account)
end
def set_title
@app_title = Rails.application.class.to_s.split('::').first
-
+
@title = if params[:bhf_area]
t("bhf.areas.page_title.#{params[:bhf_area]}",
area: params[:bhf_area],
title: @app_title,
default: t('bhf.areas.page_title',
@@ -83,17 +83,16 @@
end
end
def set_message(type, model = nil)
key = model && ActiveModel::Naming.singular(model)
-
I18n.t("bhf.activerecord.notices.models.#{key}.#{type}", model: model.model_name.human, default: I18n.t("activerecord.notices.messages.#{type}"))
end
def init_time
@start_time = Time.now
end
-
+
def find_platform(platform_name)
Bhf::Platform::Base.new(@settings.find_platform_settings(platform_name))
end
def redirect_back_or_default(default, msg)