diff --git a/app/models/follow.rb b/app/models/follow.rb index d37f214..125ec68 100644 --- a/app/models/follow.rb +++ b/app/models/follow.rb @@ -4,8 +4,8 @@ class Follow < ActiveRecord::Base extend ActsAsFollower::FollowScopes # NOTE: Follows belong to the "followable" interface, and also to followers - belongs_to :followable, :polymorphic => true - belongs_to :follower, :polymorphic => true + belongs_to :followable, polymorphic: true + belongs_to :follower, polymorphic: true def block! self.update_attribute(:blocked, true) diff --git a/db/migrate/20160712061614_acts_as_follower_migration.rb b/db/migrate/20160712061614_acts_as_follower_migration.rb index d6a60c0..0b39c01 100644 --- a/db/migrate/20160712061614_acts_as_follower_migration.rb +++ b/db/migrate/20160712061614_acts_as_follower_migration.rb @@ -1,14 +1,14 @@ class ActsAsFollowerMigration < ActiveRecord::Migration def self.up - create_table :follows, :force => true do |t| - t.references :followable, :polymorphic => true, :null => false - t.references :follower, :polymorphic => true, :null => false - t.boolean :blocked, :default => false, :null => false + create_table :follows, force: true do |t| + t.references :followable, polymorphic: true, null: false + t.references :follower, polymorphic: true, null: false + t.boolean :blocked, default: false, null: false t.timestamps end - add_index :follows, ["follower_id", "follower_type"], :name => "fk_follows" - add_index :follows, ["followable_id", "followable_type"], :name => "fk_followables" + add_index :follows, ["follower_id", "follower_type"], name: "fk_follows" + add_index :follows, ["followable_id", "followable_type"], name: "fk_followables" end def self.down