-
-
Save anonymous/96f1f84f056b8deb24ed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# okay | |
after_save :search_reindex, :if => lambda { |r| | |
Searchable.enabled? && | |
r.changes.present? && | |
(r.search_indexed_fields & r.changes.keys.select {|k| r.changes[k]}.collect(&:to_sym)).any? | |
} | |
# tried to create Proc object without a block | |
after_save :search_reindex, :if => lambda do |r| | |
Searchable.enabled? && | |
r.changes.present? && | |
(r.search_indexed_fields & r.changes.keys.select {|k| r.changes[k]}.collect(&:to_sym)).any? | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment