- 'bin/setup'
- 'bin/update'
-Style/RedundantCondition:
- Exclude:
- - 'app/controllers/messages_controller.rb'
- - 'app/controllers/sessions_controller.rb'
- - 'app/controllers/users_controller.rb'
-
Style/StringLiterals:
EnforcedStyle: double_quotes
referer = safe_referer(params[:referer]) if params[:referer]
- if referer
- redirect_to referer
- else
- redirect_to :action => :inbox
- end
+ redirect_to referer || { :action => :inbox }
end
rescue ActiveRecord::RecordNotFound
@title = t "messages.no_such_message.title"
referer = safe_referer(params[:referer]) if params[:referer]
- if referer
- redirect_to referer
- else
- redirect_to :controller => "site", :action => "index"
- end
+ redirect_to referer || { :controller => "site", :action => "index" }
end
end
if current_user
# The user is logged in already, so don't show them the signup
# page, instead send them to the home page
- if @referer
- redirect_to @referer
- else
- redirect_to :controller => "site", :action => "index"
- end
+ redirect_to @referer || { :controller => "site", :action => "index" }
elsif params.key?(:auth_provider) && params.key?(:auth_uid)
self.current_user = User.new(:email => params[:email],
:email_confirmation => params[:email],