diff --git a/app/models/user.rb b/app/models/user.rb index e9331e99f..53cec3c8f 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -74,7 +74,7 @@ class User < ActiveRecord::Base scope :without_subscription, -> { includes(:subscriptions).where(subscriptions: { user_id: nil }) } scope :with_subscription, -> { joins(:subscriptions) } - def to_json(options) + def to_json(options = {}) ApplicationController.new.view_context.render( partial: 'api/members/member', locals: { :member => self },