Module: SerializePartialAttributes::Serializer
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/serialize_partials_attributes.rb
Instance Method Summary collapse
Instance Method Details
#has_only_attributes_key? ⇒ Boolean
28 29 30 31 32 33 34 |
# File 'lib/serialize_partials_attributes.rb', line 28 def has_only_attributes_key? if self..has_key?(:only_attributes) && self.[:only_attributes].present? true else false end end |
#only_attributes ⇒ Object
35 36 37 |
# File 'lib/serialize_partials_attributes.rb', line 35 def only_attributes self.[:only_attributes].map { |x| x.to_sym } end |