upgrades ruby hash syntax
This commit is contained in:
@@ -13,7 +13,7 @@ class Comment < ActiveRecord::Base
|
||||
belongs_to :commentable, -> { with_hidden }, polymorphic: true, counter_cache: true
|
||||
belongs_to :user, -> { with_hidden }
|
||||
|
||||
has_many :flags, :as => :flaggable
|
||||
has_many :flags, as: :flaggable
|
||||
|
||||
scope :recent, -> { order(id: :desc) }
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ class Debate < ActiveRecord::Base
|
||||
include ActsAsParanoidAliases
|
||||
|
||||
belongs_to :author, -> { with_hidden }, class_name: 'User', foreign_key: 'author_id'
|
||||
has_many :flags, :as => :flaggable
|
||||
has_many :comments, as: :commentable
|
||||
has_many :flags, as: :flaggable
|
||||
|
||||
validates :title, presence: true
|
||||
validates :description, presence: true
|
||||
|
||||
Reference in New Issue
Block a user