Skip to content

Instantly share code, notes, and snippets.

@timruffles
Created November 30, 2010 18:11
Show Gist options
  • Save timruffles/722101 to your computer and use it in GitHub Desktop.
Save timruffles/722101 to your computer and use it in GitHub Desktop.
this is fattening for our controllers, and should be encapsulated
end
end
previous_last_bonus = @user.bonuses.any? && @user.bonuses.last
if !problems && @user.save_with_identity(@identity)
flash[:notice] = "The user has been updated."
if @user.bonuses.any? && @user.bonuses.last.bonus_offer.is_bet_for_free? && @user.bonuses.last != previous_last_bonus
flash[:notice] += " We have awarded the bet for free bonus for the user."
end
log_admin_action(
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment