Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix bug with only param
  • Loading branch information
albertc5 committed Apr 18, 2019
1 parent 0daa818 commit 06045ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/application_record.rb
Expand Up @@ -167,8 +167,8 @@ def as_json(options = {})
end

if options[:only]
options[:methods] = options[:methods] & options[:only]
options[:include] = options[:include] & options[:only]
options[:methods] = options[:methods] & options[:only].map(&:to_sym)
options[:include] = options[:include] & options[:only].map(&:to_sym)
end

super(options)
Expand Down

0 comments on commit 06045ac

Please sign in to comment.