Sha256: 0151000c181ed0d2d4701b03ca702f39c884068b7bb4e66755c8cd0742dc4cb0
Contents?: true
Size: 620 Bytes
Versions: 1
Compression:
Stored size: 620 Bytes
Contents
class Tramway::Auth::Web::SignUpsController < Tramway::Auth::Web::ApplicationController before_action :check_authenticable_models def create @form = "#{model_class}SignUpForm".constantize.new model_class.new if @form.submit params[:record] redirect_to Rails.application.routes.url_helpers.root_path flash: :success else redirect_to Rails.application.routes.url_helpers.root_path flash: :error, errors: @form.errors.messages, record: @form.attributes end end private def check_authenticable_models return unless params[:model].in? Tramway::Auth.authenticable_models end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tramway-auth-1.2 | app/controllers/tramway/auth/web/sign_ups_controller.rb |