Commit 1d586abb by John Hawthorn

Use alias_method everywhere

Just for consitency. alias_method is easier to reason about than
only_deleted.
parent b151329d
...@@ -38,7 +38,7 @@ module Paranoia ...@@ -38,7 +38,7 @@ module Paranoia
quoted_paranoia_column = connection.quote_column_name(paranoia_column) quoted_paranoia_column = connection.quote_column_name(paranoia_column)
with_deleted.where("#{quoted_paranoia_column} IS NULL OR #{quoted_paranoia_column} != ?", paranoia_sentinel_value) with_deleted.where("#{quoted_paranoia_column} IS NULL OR #{quoted_paranoia_column} != ?", paranoia_sentinel_value)
end end
alias :deleted :only_deleted alias_method :deleted, :only_deleted
def restore(id_or_ids, opts = {}) def restore(id_or_ids, opts = {})
ids = Array(id_or_ids).flatten ids = Array(id_or_ids).flatten
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment