rename lambda references to use shorthand syntax

This commit is contained in:
Albert Yi
2018-05-10 11:18:02 -07:00
parent 320f1a426e
commit 72f319ccf3
27 changed files with 69 additions and 69 deletions

View File

@@ -7,7 +7,7 @@ class Note < ApplicationRecord
belongs_to :post
belongs_to_creator
belongs_to_updater
has_many :versions, lambda {order("note_versions.id ASC")}, :class_name => "NoteVersion", :dependent => :destroy
has_many :versions, -> {order("note_versions.id ASC")}, :class_name => "NoteVersion", :dependent => :destroy
validates_presence_of :post_id, :creator_id, :updater_id, :x, :y, :width, :height, :body
validate :post_must_exist
validate :note_within_image