Changes in Registration Process
This commit is contained in:
parent
242878a09f
commit
dead52d8ab
|
@ -1,7 +1,6 @@
|
|||
class SessionsController < Devise::SessionsController
|
||||
|
||||
def create
|
||||
debugger
|
||||
super
|
||||
reset_session
|
||||
end
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
class Desktop::RegistrationsController < Devise::RegistrationsController
|
||||
|
||||
def update
|
||||
self.resource = resource_class.to_adapter.get!(send(:"current_#{resource_name}").to_key)
|
||||
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
class RegistrationsController < Devise::RegistrationsController
|
||||
layout "devise"
|
||||
end
|
|
@ -60,6 +60,10 @@ class User
|
|||
validates :user_id,
|
||||
:presence => { :message => I18n.t("users.user_id_not_null") } ,
|
||||
:length => {:minimum => 3, :maximum => 50, :message => I18n.t("users.user_id_length") }
|
||||
|
||||
def email_required?
|
||||
false
|
||||
end
|
||||
# validates_uniqueness_of :email,:message=> I18n.t("devise.registrations.email_not_unique")
|
||||
|
||||
# def new_attribute_values=(vars)
|
||||
|
|
|
@ -163,8 +163,9 @@
|
|||
<label class="control-label muted">Default Language</label>
|
||||
<div class="controls">
|
||||
<% @site_in_use_locales.each do |locale| %>
|
||||
<%= radio_button_tag "site[default_locale]", locale, @locale == locale,:class=>"toggle-check in_use_locales", :data => { :title => "#{I18nVariable.from_locale(locale)}", disabled: true } %>
|
||||
<%= radio_button_tag "site[default_locale]", locale, @locale == locale ,:class=>"toggle-check in_use_locales", :data => { :title => "#{I18nVariable.from_locale(locale)}" } %>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
|
||||
<%= devise_error_messages! %>
|
||||
|
||||
<!-- <div><%= f.label :email %><br />
|
||||
<div><%= f.label :email %><br />
|
||||
<%= f.email_field :email %></div>
|
||||
-->
|
||||
|
||||
<div><%= f.label "Username" %><br />
|
||||
<%= f.email_field :user_id %></div>
|
||||
<%= f.text_field :user_id %></div>
|
||||
|
||||
<div><%= f.label :password %><br />
|
||||
<%= f.password_field :password %></div>
|
||||
|
|
|
@ -3,9 +3,7 @@ Orbit::Application.routes.draw do
|
|||
|
||||
# get "robots.txt" => 'robots#index'
|
||||
|
||||
|
||||
|
||||
devise_for :users do
|
||||
devise_for :users, :controllers => { :registrations => "registrations" } do
|
||||
match "/users_passwd" => "desktop/registrations#update", :as => :users_passwd, :via => :put
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue