Skip to content

Instantly share code, notes, and snippets.

@arturo-c
Created November 10, 2013 23:04
Show Gist options
  • Save arturo-c/7405129 to your computer and use it in GitHub Desktop.
Save arturo-c/7405129 to your computer and use it in GitHub Desktop.
def show(args)
@user = args[:user]
if @user.present?
@notifications = Notification.where({ 'game_admin_id' => @user.twitter_id }).order_by([:notifier_date_time, :desc])
@unread_notifications = Notification.where({ 'flag_read' => 0 })
end
respond_to do |format|
format.html
format.json { render :json => @notifications.to_json }
format.js
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment