spud_core 0.7.2 → 0.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/app/controllers/spud/users_controller.rb +5 -2
- data/app/models/spud_admin_permission.rb +3 -0
- data/app/models/spud_user.rb +2 -2
- data/lib/spud_core/version.rb +1 -1
- data/test/dummy/log/test.log +2913 -0
- metadata +26 -26
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
class Spud::UsersController < Spud::ApplicationController
|
|
2
2
|
before_filter :require_user
|
|
3
3
|
layout 'spud/admin/detail'
|
|
4
|
-
|
|
4
|
+
|
|
5
5
|
def settings
|
|
6
|
+
add_breadcrumb "Settings", :spud_settings_path
|
|
6
7
|
@page_thumbnail = "spud/admin/users_thumb.png"
|
|
7
8
|
@page_name = "Settings"
|
|
8
9
|
end
|
|
9
10
|
|
|
10
11
|
def update
|
|
12
|
+
|
|
13
|
+
add_breadcrumb "Settings", :spud_settings_path
|
|
11
14
|
@page_thumbnail = "spud/admin/users_thumb.png"
|
|
12
15
|
@page_name = "Settings"
|
|
13
|
-
if @current_user.update_attributes(params[:spud_user])
|
|
16
|
+
if @current_user.update_attributes(params[:spud_user].slice :login,:first_name,:last_name,:email,:password,:password_confirmation)
|
|
14
17
|
flash[:notice] = "User settings saved successfully."
|
|
15
18
|
redirect_to spud_admin_root_url()
|
|
16
19
|
else
|
data/app/models/spud_user.rb
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
class SpudUser < ActiveRecord::Base
|
|
2
2
|
has_many :spud_admin_permissions,:foreign_key => :user_id
|
|
3
3
|
accepts_nested_attributes_for :spud_admin_permissions, :allow_destroy => true
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
|
|
5
|
+
attr_accessible :login,:email,:first_name,:last_name,:password,:password_confirmation,:password_salt,:last_login_at,:last_request_at,:last_login_ip,:failed_login_count,:current_login_at,:login_count,:persistence_token,:perishable_token,:single_access_token,:crypted_password, :current_login_ip, :created_at, :updated_at,:spud_admin_permissions_attributes
|
|
6
6
|
acts_as_authentic do |c|
|
|
7
7
|
# c.my_config_option = my_value # for available options see documentation in: Authlogic::ActsAsAuthentic
|
|
8
8
|
end # block optional
|
data/lib/spud_core/version.rb
CHANGED