Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions Gemfile

This file was deleted.

36 changes: 0 additions & 36 deletions Gemfile.lock

This file was deleted.

2 changes: 1 addition & 1 deletion app/controllers/app_notifications_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def index
def view
@notification = AppNotification.find(params[:id])
if @notification.recipient == User.current
AppNotification.update(@notification, :viewed => true)
AppNotification.update(@notification.id, :viewed => true)
if request.xhr?
if @notification.is_edited?
render :partial => 'issues/issue_edit', :formats => [:html], :locals => { :notification => @notification, :journal => @notification.journal }
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/001_create_app_notifications.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateAppNotifications < ActiveRecord::Migration
class CreateAppNotifications < Rails.version < '5.1' ? ActiveRecord::Migration : ActiveRecord::Migration[4.2]
def change
create_table :app_notifications do |t|
t.datetime :created_on
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/002_update_users.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class UpdateUsers < ActiveRecord::Migration
class UpdateUsers < Rails.version < '5.1' ? ActiveRecord::Migration : ActiveRecord::Migration[4.2]
def self.up
change_table :users do |t|
t.column :app_notification, :boolean, :default => false
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/003_update_users2.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class UpdateUsers2 < ActiveRecord::Migration
class UpdateUsers2 < Rails.version < '5.1' ? ActiveRecord::Migration : ActiveRecord::Migration[4.2]
def self.up
change_table :users do |t|
t.column :app_notification_desktop, :boolean, :default => false
Expand Down
3 changes: 2 additions & 1 deletion lib/app_notifications_account_patch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ def self.included(base) # :nodoc:
base.class_eval do
unloadable # Send unloadable so it will not be unloaded in development

alias_method_chain :account, :in_app_option
alias_method :account_without_in_app_option, :account
alias_method :account, :account_with_in_app_option
end
end

Expand Down