Method create
has 28 lines of code (exceeds 25 allowed). Consider refactoring.
def create
auth = request.env['omniauth.auth']
@identity = Identity.find_with_omniauth(auth)
if @identity.nil?
Method create
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
def create
auth = request.env['omniauth.auth']
@identity = Identity.find_with_omniauth(auth)
if @identity.nil?
Method reply
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
def reply
if params[:result][:action] == 'getNextMeetupDate'
msg = nextMeetupDate
elsif params[:result][:action] == 'getNextMeetupSpeaker'
context = params[:result][:contexts].any? {|context| context[:name].downcase == 'nextmeetup'}
Method notify_proposal
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
def notify_proposal(activity, user)
@user = user
@activity = activity
I18n.with_locale(@user.locale) do
if @activity.objective_type == 'Assistance' && @user.notify_comments