Files
danbooru/app/models/artist_commentary_version.rb
2019-08-29 20:44:27 -05:00

16 lines
315 B
Ruby

class ArtistCommentaryVersion < ApplicationRecord
belongs_to :post
belongs_to_updater
def self.search(params)
q = super
q = q.search_user_attribute(:updater, params)
if params[:post_id]
q = q.where("post_id = ?", params[:post_id].to_i)
end
q.apply_default_order(params)
end
end