rename lambda references to use shorthand syntax
This commit is contained in:
@@ -16,16 +16,16 @@ class Artist < ApplicationRecord
|
||||
belongs_to_creator
|
||||
has_many :members, :class_name => "Artist", :foreign_key => "group_name", :primary_key => "name"
|
||||
has_many :urls, :dependent => :destroy, :class_name => "ArtistUrl"
|
||||
has_many :versions, lambda {order("artist_versions.id ASC")}, :class_name => "ArtistVersion"
|
||||
has_many :versions, -> {order("artist_versions.id ASC")}, :class_name => "ArtistVersion"
|
||||
has_one :wiki_page, :foreign_key => "title", :primary_key => "name"
|
||||
has_one :tag_alias, :foreign_key => "antecedent_name", :primary_key => "name"
|
||||
has_one :tag, :foreign_key => "name", :primary_key => "name"
|
||||
attribute :notes, :string
|
||||
|
||||
scope :active, lambda { where(is_active: true) }
|
||||
scope :deleted, lambda { where(is_active: false) }
|
||||
scope :banned, lambda { where(is_banned: true) }
|
||||
scope :unbanned, lambda { where(is_banned: false) }
|
||||
scope :active, -> { where(is_active: true) }
|
||||
scope :deleted, -> { where(is_active: false) }
|
||||
scope :banned, -> { where(is_banned: true) }
|
||||
scope :unbanned, -> { where(is_banned: false) }
|
||||
|
||||
module UrlMethods
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
Reference in New Issue
Block a user