tomichj / invitation

A Rails gem that can send 'scoped' invitations
MIT License
77 stars 28 forks source link

Rails 5.1 deprecation warning #6

Closed vincentwoo closed 7 years ago

vincentwoo commented 7 years ago

On Rails 5.1 rc1 I get this deprecation warning on my invitation create endpoint:

19:19:49 web.1 | DEPRECATION WARNING: The behavior ofchanged_attributesinside of after callbacks will be changing in the next version of Rails. The new return value will reflect the behavior of calling the method aftersavereturned (e.g. the opposite of what it returns now). To maintain the current behavior, usesaved_changes.transform_values(&:first)instead. (called from create at /Users/vwoo/coderpad.io/app/controllers/invites_controller.rb:7)

My override class only looks like:

class InvitesController < Invitation::InvitesController
  layout 'login'

  def create
    params[:invite][:invitable_id] = current_org.id
    params[:invite][:invitable_type] = 'Organization'
    super
  end
end

so I'm not super sure what's causing the message. Any idea?

vincentwoo commented 7 years ago

Seemed to stop happening? Nevermind!