Fixed issue where setting your settings would log you out.
This commit is contained in:
parent
0e25fb4cdb
commit
dc6295328a
6 changed files with 16 additions and 6 deletions
|
@ -20,7 +20,9 @@ class UsersController < ApplicationController
|
|||
#@user.settings.metacodes=@m.split(',')
|
||||
|
||||
@user.save
|
||||
|
||||
|
||||
sign_in(@user, :bypass => true)
|
||||
|
||||
respond_with(@user, location: session[:previous_url]) do |format|
|
||||
end
|
||||
end
|
||||
|
|
|
@ -16,9 +16,12 @@ class UsersController < ApplicationController
|
|||
@user = current_user
|
||||
@user.attributes = params[:user]
|
||||
|
||||
|
||||
@user.save
|
||||
#@m = params[:metacodes][:value]
|
||||
#@user.settings.metacodes=@m.split(',')
|
||||
|
||||
@user.save
|
||||
|
||||
|
||||
respond_with(@user, location: session[:previous_url]) do |format|
|
||||
end
|
||||
end
|
||||
|
|
|
@ -95,3 +95,7 @@ $(document).ready(function() {
|
|||
|
||||
});
|
||||
</script>
|
||||
|
||||
FROM USERS CONTROLLER>
|
||||
@m = params[:metacodes][:value]
|
||||
@user.settings.metacodes=@m.split(',')
|
||||
|
|
|
@ -14,5 +14,6 @@
|
|||
<%= form.input :email, label: "Email", class: "email" %>
|
||||
<%= form.input :password, label: "Password", class: "password" %>
|
||||
<%= form.submit "Update", class: "update" %>
|
||||
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<%= form.input :name, label: "Name", class: "name" %>
|
||||
<%= form.input :email, label: "Email", class: "email" %>
|
||||
<%= form.input :password, label: "Password", class: "password" %>
|
||||
<%= hidden_field(:metacodes, :value, {:value => 0}) %>
|
||||
<%= form.submit "Update", class: "update" %>
|
||||
<% :bypass=>true to sign_in(@user) %>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ Devise.setup do |config|
|
|||
|
||||
# Options to be passed to the created cookie. For instance, you can set
|
||||
# :secure => true in order to force SSL only cookies.
|
||||
# config.rememberable_options = {}
|
||||
config.rememberable_options = true
|
||||
|
||||
# ==> Configuration for :validatable
|
||||
# Range for password length. Default is 8..128.
|
||||
|
@ -198,7 +198,7 @@ Devise.setup do |config|
|
|||
|
||||
# Set this configuration to false if you want /users/sign_out to sign out
|
||||
# only the current scope. By default, Devise signs out all scopes.
|
||||
# config.sign_out_all_scopes = false
|
||||
# config.sign_out_all_scopes = true
|
||||
|
||||
# ==> Navigation configuration
|
||||
# Lists the formats that should be treated as navigational. Formats like
|
||||
|
|
Loading…
Reference in a new issue