Sha256: dba0c3ac8d5ce085b552dbe98c44f69751cbb1e82ddf4dc1b36ad2d0b920b9b7

Contents?: true

Size: 291 Bytes

Versions: 46

Compression:

Stored size: 291 Bytes

Contents

module WithUserParams
  extend ActiveSupport::Concern

  def user_params
    params.require(:user).permit(*permissible_params).to_h
  end

  def user_name_params
    params.require(:user).permit(:first_name, :last_name).to_h
  end

  def permissible_params
    User.profile_fields
  end
end

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
mumuki-laboratory-9.9.0 app/controllers/concerns/with_user_params.rb
mumuki-laboratory-9.8.2 app/controllers/concerns/with_user_params.rb
mumuki-laboratory-9.8.1 app/controllers/concerns/with_user_params.rb
mumuki-laboratory-9.8.0 app/controllers/concerns/with_user_params.rb
mumuki-laboratory-9.7.2 app/controllers/concerns/with_user_params.rb
mumuki-laboratory-9.7.1 app/controllers/concerns/with_user_params.rb
mumuki-laboratory-9.7.0 app/controllers/concerns/with_user_params.rb
mumuki-laboratory-9.6.0 app/controllers/concerns/with_user_params.rb
mumuki-laboratory-9.5.1 app/controllers/concerns/with_user_params.rb
mumuki-laboratory-9.5.0 app/controllers/concerns/with_user_params.rb
mumuki-laboratory-9.4.1 app/controllers/concerns/with_user_params.rb
mumuki-laboratory-9.4.0 app/controllers/concerns/with_user_params.rb
mumuki-laboratory-9.3.1 app/controllers/concerns/with_user_params.rb
mumuki-laboratory-9.3.0 app/controllers/concerns/with_user_params.rb
mumuki-laboratory-9.2.0 app/controllers/concerns/with_user_params.rb
mumuki-laboratory-9.1.3 app/controllers/concerns/with_user_params.rb
mumuki-laboratory-9.1.2 app/controllers/concerns/with_user_params.rb
mumuki-laboratory-9.1.1 app/controllers/concerns/with_user_params.rb
mumuki-laboratory-9.1.0 app/controllers/concerns/with_user_params.rb
mumuki-laboratory-9.0.6 app/controllers/concerns/with_user_params.rb