Many supplier features and style upgrades and fixes

This commit is contained in:
2015-10-06 16:08:00 +02:00
parent b7a5b3b750
commit 2df5b290ef
50 changed files with 225 additions and 474 deletions
+1 -9
View File
@@ -91,15 +91,6 @@ private
end
end
def check_active_list_state
if current_user.try(:active_list_id)
unless active_list.active?
current_user.list_is_closed!
redirect_to user_root_path, alert: t('messages.the_list_has_been_closed', list: List.model_name.human)
end
end
end
def active_list
return nil unless current_user.try(:active_list_id).present?
@active_list ||= List.find(current_user.active_list_id)
@@ -113,6 +104,7 @@ private
{ok: false, message: message}.merge(options).to_json
end
alias json_alert js_alert
def js_notice(*args)
options = args.extract_options!
message = args.first || ''