Skip to content

Commit

Permalink
[dash] Use correct flash messages within analytics controller
Browse files Browse the repository at this point in the history
  • Loading branch information
radar committed Nov 26, 2012
1 parent 0975368 commit e91aea6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions dash/app/controllers/spree/admin/analytics_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ def register
Spree::Dash::Config.app_token = @store[:app_token]
Spree::Dash::Config.site_id = @store[:site_id]
Spree::Dash::Config.token = @store[:site_token]
redirect_to admin_path, :notice => t(:successfully_signed_up_for_analytics)
flash[:notice] = t(:successfully_signed_up_for_analytics)
redirect_to admin_path
rescue Spree::Dash::JirafeException => e
flash[:error] = e.message
render :sign_up
Expand All @@ -44,7 +45,9 @@ def register
private

def redirect_if_registered
redirect_to admin_path, :notice => t(:already_signed_up_for_analytics) if Spree::Dash::Config.configured?
if Spree::Dash::Config.configured?
flash[:success] = t(:already_signed_up_for_analytics)
redirect_to admin_path
end

def format_url(url)
Expand Down

0 comments on commit e91aea6

Please sign in to comment.