rename lambda references to use shorthand syntax
This commit is contained in:
@@ -52,8 +52,8 @@ class Post < ApplicationRecord
|
||||
has_many :appeals, :class_name => "PostAppeal", :dependent => :destroy
|
||||
has_many :votes, :class_name => "PostVote", :dependent => :destroy
|
||||
has_many :notes, :dependent => :destroy
|
||||
has_many :comments, lambda {includes(:creator, :updater).order("comments.id")}, :dependent => :destroy
|
||||
has_many :children, lambda {order("posts.id")}, :class_name => "Post", :foreign_key => "parent_id"
|
||||
has_many :comments, -> {includes(:creator, :updater).order("comments.id")}, :dependent => :destroy
|
||||
has_many :children, -> {order("posts.id")}, :class_name => "Post", :foreign_key => "parent_id"
|
||||
has_many :approvals, :class_name => "PostApproval", :dependent => :destroy
|
||||
has_many :disapprovals, :class_name => "PostDisapproval", :dependent => :destroy
|
||||
has_many :favorites
|
||||
@@ -85,7 +85,7 @@ class Post < ApplicationRecord
|
||||
end
|
||||
|
||||
if PostArchive.enabled?
|
||||
has_many :versions, lambda {order("post_versions.updated_at ASC")}, :class_name => "PostArchive", :dependent => :destroy
|
||||
has_many :versions, -> {order("post_versions.updated_at ASC")}, :class_name => "PostArchive", :dependent => :destroy
|
||||
end
|
||||
|
||||
module FileMethods
|
||||
|
||||
Reference in New Issue
Block a user