title: Method .save raises ArgumentError
body: <p>I updated <em>Ruby</em> and <em>Rails</em> version of my project.</p>
  
  <p>Ruby <code>2.2.3</code> –> <code>2.5.1</code></p>
  
  <p>Rails <code>4.1.8</code> –> <code>5.1.7</code></p>
  
  <p>When I try to register a new user, I get an error:</p>
  
  <pre><code>ArgumentError (wrong number of arguments (given 2, expected 0..1)):
     app/controllers/users/registrations_controller.rb:41:in `create'
  </code></pre>
  
  <p>This happens both from client side (frontend) and from Rails console.</p>
  
  <p><em>registrations_controller.rb:</em></p>
  
  <pre><code>39: def create
  40:   build_resource(sign_up_params)
  41:   resource_saved = resource.save
  42:
  43:   yield resource if block_given?
  44:
  45:   if resource_saved
  46:     if resource.active_for_authentication?
          ...
  </code></pre>
  
  <p><em>In Rails console:</em></p>
  
  <pre><code>user = User.new(email: "qwe@test.com", name: "qwe qwe", password: '123123123')
  
  =&gt; #&lt;User id: nil, email: "qwe32@q.com", created_at: nil...
  
  user.save!
  
  ROLLBACK
  Traceback (most recent call last):
          1: from (irb):4
  ArgumentError (wrong number of arguments (given 2, expected 0..1))
  </code></pre>
  
  <p><em>User model:</em> </p>
  
  <pre><code>class User &lt; ActiveRecord::Base
    extend FriendlyId
    include InstantSearch
    include PushNotificationToFollowers
    include CarrierWave::MiniMagick
  
    serialize :site_link, Array
    serialize :followers_ids, Array
  
    acts_as_token_authenticatable
    acts_as_follower
    acts_as_followable
    acts_as_liker
    acts_as_likeable
  
    attr_accessor   :site_link_raw
  
    mount_uploader :avatar, AvatarUploader
  
    devise :database_authenticatable, :registerable,
           :recoverable, :rememberable, :trackable, :validatable, :omniauthable,
           omniauth_providers: [:facebook, :google_oauth2]
  
    validates :name, presence: true
    validates :slug, uniqueness: true
    validates_format_of :slug, with: /\A\d+[a-zA-Z]+\S*\z|\A[^\s\d]\S*\z/i, message: 'minimum one letter, without spaces', on: :update
  
    friendly_id :slug_candidates, use: [:slugged, :finders]
  
    {some associations}
  
    before_create :check_slug
    after_create :set_membership
    after_create :send_welcome_email
    after_create :set_settings
  
    ransacker :id,
              formatter: -&gt;(bool) {
                users_ids = SoundUploader.select(:user_id).where(active:true)
  
                if bool == 'true'
                  users_ids.present? ?  where("users.id IN (#{users_ids.to_sql})").map(&amp;:id) : nil
                else
                  where("users.id NOT IN (#{users_ids.to_sql})").map(&amp;:id)
                end
  
              } do |user|
        user.table[:id]
    end
  
  
    def check_slug
      unless self.slug.match(/\A\d+[a-zA-Z]+\S*\z|\A[^\s\d]\S*\z/i)
        new_slug = "project-#{self.slug}"
        user = User.find_by(slug: new_slug)
        new_slug = "#{new_slug}-#{DateTime.current.to_i}" if user
        self.slug = new_slug
      end
    end
  
    def set_membership
      self.memberships.create
    end
  
    def send_welcome_email
      UserMailer.welcome_email(self.id).deliver
    end
  
    def set_settings
      self.create_setting
    end
  </code></pre>
  
  <p>With other models, I don't get this error.</p>
  
  <p>But with <em>User</em> model, no matter how I call <code>save</code> method, this error always appears.</p>