upgrades ruby hash syntax

This commit is contained in:
rgarcia
2015-09-05 22:01:52 +02:00
parent cba83e6dd2
commit 0bca1c5b95
2 changed files with 2 additions and 2 deletions

View File

@@ -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) }

View File

@@ -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