module JbuilderExcept
Constants
- VERSION
Public Instance Methods
except!(resource, *attributes)
click to toggle source
# File lib/jbuilder/except.rb, line 4 def except!(resource, *attributes) extract! resource, *keys_except(resource, *attributes) if resource.present? end
Private Instance Methods
keys_except(resource, *attributes)
click to toggle source
# File lib/jbuilder/except.rb, line 9 def keys_except(resource, *attributes) (resource.attributes.keys - attributes.map(&:to_s)).map(&:to_sym) end