Fix Rails 4.1 migration issues

This commit is contained in:
r888888888
2014-04-24 16:15:59 -07:00
parent 616aef4394
commit a89c57cee0
7 changed files with 22 additions and 9 deletions

View File

@@ -431,4 +431,8 @@ class Artist < ActiveRecord::Base
def deletable_by?(user)
user.is_builder?
end
def visible?
!is_banned? || CurrentUser.user.is_janitor?
end
end

View File

@@ -5,7 +5,7 @@ class ArtistCommentaryVersion < ActiveRecord::Base
attr_accessible :post_id, :original_title, :original_description, :translated_title, :translated_description
def self.search(params)
q = scoped
q = where("true")
params = {} if params.blank?
if params[:updater_id]

View File

@@ -4,7 +4,7 @@ class ModAction < ActiveRecord::Base
attr_accessible :description
def self.search(params = {})
q = scoped
q = where("true")
return q if params.blank?
if params[:creator_id].present?