Sha256: fdb79985fe605d1f25138d0217a42ef505b5649d271ca73acc2fe52c4363f2d1

Contents?: true

Size: 833 Bytes

Versions: 2

Compression:

Stored size: 833 Bytes

Contents

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

  # def deliver_confirmation_instructions(<%= singular_name %>)
  #   <%= class_name %>Mailer.confirmation_instructions(<%= singular_name %>).<%= delivery_method %>
  # end

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

  # def after_destroy_url(<%= singular_name %>)
  #   root_url
  # 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

2 entries across 2 versions & 1 rubygems

Version Path
janus-0.10.1 lib/generators/templates/registrations_controller.erb
janus-0.10.0 lib/generators/templates/registrations_controller.erb