Sha256: 001ee5dc7f0603ca37db87275c213548e2daa2c51eccfec4a12fae9a6f59546a

Contents?: true

Size: 587 Bytes

Versions: 3

Compression:

Stored size: 587 Bytes

Contents

class <%= class_name.pluralize %>::RegistrationsController < Janus::RegistrationsController
  respond_to :html

  # def after_sign_up_url(<%= singular_name %>)
  #   profile_url(<%= singular_name %>)
  # end

  def <%= singular_name %>_params
    if params.respond_to?(:permit)
      # Rails 4 (or Rails 3 + strong_parameters)
      params.require(:<%= singular_name %>).permit(:email, :current_password, :password, :password_confirmation)
    else
      # Rails 3
      params[:<%= singular_name %>].slice(:email, :current_password, :password, :password_confirmation)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
janus-0.8.1 lib/generators/templates/registrations_controller.erb
janus-0.8.0 lib/generators/templates/registrations_controller.erb
janus-0.7.0 lib/generators/templates/registrations_controller.erb