Skip to content

Commit

Permalink
fabirca is always expecting an object
Browse files Browse the repository at this point in the history
  • Loading branch information
kjgarza committed May 7, 2019
1 parent 447b31c commit bd86d18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/serializers/provider_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class ProviderSerializer
end

attribute :billing_information, if: Proc.new { |object, params| params[:current_ability] && params[:current_ability].can?(:read_billing_information, object) == true } do |object|
object.billing_information.transform_keys!{ |key| key.to_s.camelcase(:lower) } if object.billing_information.present?
object.billing_information.present? ? object.billing_information.transform_keys!{ |key| key.to_s.camelcase(:lower) } : {}
end

attribute :twitter_handle, if: Proc.new { |object, params| params[:current_ability] && params[:current_ability].can?(:read_billing_information, object) == true } do |object|
Expand Down

0 comments on commit bd86d18

Please sign in to comment.