lib/generators/templates/add_gcm.rb
Method up
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.up
add_column :rapns_notifications, :type, :string, null: true
add_column :rapns_apps, :type, :string, null: true
AddGcm::Rapns::Notification.update_all type: 'Rapns::Apns::Notification'
Method down
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.down
AddGcm::Rapns::Notification.where(type: 'Rapns::Gcm::Notification').delete_all
remove_column :rapns_notifications, :type
remove_column :rapns_apps, :type