caboose-cms 0.3.56 → 0.3.57
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.
- checksums.yaml +8 -8
- data/app/controllers/caboose/users_controller.rb +12 -2
- data/app/models/caboose/schema.rb +11 -3
- data/app/models/caboose/user.rb +9 -1
- data/lib/caboose/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZDliMmY1OTRjOWY2NGUyOGQzY2JlYmM5ZGVmYzRjMDcxOGZjNmFiMg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Y2ZjMzM0YWFmYjNlZTU4NmRkODQwN2ExM2E5NDAzMWYyM2IyOWE1NQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NDRmMGU2YWM1MDVmM2VmYzRiY2E1N2ViMjEyYmYzYmIxOTJkZmRhMTQ3MjVh
|
10
|
+
MTFkYzJjMDEwYzA5MjY3ZDc4NjEzODllMWZmYTM0NmU5ZGVkNTNkMWFkYjMy
|
11
|
+
NTAwYmRhZmQ1ZTFhYmRiMzQ1ZmJmODdkYTM1ZWU5OTI2YjhhYmI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YTJmODIyNzJhNmFiYWRiNWRkMjA1NTJlYWU1MDI5NDk5OTE4NTlhYzE2NGE2
|
14
|
+
OTFkZmQxOTliZGI3N2Q3ZDQwY2U0NzZhMDdiZGM0Yjg1NzE0ZTNmNzQyMzVl
|
15
|
+
YjViYjZkMjU2OGY3NzEzMDIzNjFlN2ZlYTI0MzVjMmI0MDljZWQ=
|
@@ -122,8 +122,18 @@ module Caboose
|
|
122
122
|
save = true
|
123
123
|
params.each do |name,value|
|
124
124
|
case name
|
125
|
-
|
126
|
-
|
125
|
+
when 'first_name' then user.first_name = value
|
126
|
+
when 'last_name' then user.last_name = value
|
127
|
+
when 'username' then user.username = value
|
128
|
+
when 'email' then user.email = value
|
129
|
+
when 'address' then user.address = value
|
130
|
+
when 'address2' then user.address2 = value
|
131
|
+
when 'city' then user.city = value
|
132
|
+
when 'state' then user.state = value
|
133
|
+
when 'zip' then user.zip = value
|
134
|
+
when 'phone' then user.phone = value
|
135
|
+
when 'fax' then user.fax = value
|
136
|
+
when 'utc_offset' then user.utc_offset = value.to_f
|
127
137
|
when "password"
|
128
138
|
confirm = params[:password2]
|
129
139
|
if (value != confirm)
|
@@ -36,13 +36,21 @@ class Caboose::Schema < Caboose::Utilities::Schema
|
|
36
36
|
[ :first_name , :string ],
|
37
37
|
[ :last_name , :string ],
|
38
38
|
[ :username , :string ],
|
39
|
-
[ :email , :string ],
|
40
|
-
[ :
|
39
|
+
[ :email , :string ],
|
40
|
+
[ :address , :string ],
|
41
|
+
[ :address2 , :string ],
|
42
|
+
[ :city , :string ],
|
43
|
+
[ :state , :string ],
|
44
|
+
[ :zip , :string ],
|
45
|
+
[ :phone , :string ],
|
46
|
+
[ :fax , :string ],
|
47
|
+
[ :utc_offset , :float , { :default => -5 }],
|
41
48
|
[ :password , :string ],
|
42
49
|
[ :password_reset_id , :string ],
|
43
50
|
[ :password_reset_sent , :datetime ],
|
44
51
|
[ :token , :string ],
|
45
|
-
[ :date_created , :datetime ]
|
52
|
+
[ :date_created , :datetime ],
|
53
|
+
[ :image , :attachment ]
|
46
54
|
],
|
47
55
|
Caboose::Role => [
|
48
56
|
[ :parent_id , :integer ],
|
data/app/models/caboose/user.rb
CHANGED
@@ -2,7 +2,15 @@ class Caboose::User < ActiveRecord::Base
|
|
2
2
|
self.table_name = "users"
|
3
3
|
#has_and_belongs_to_many :roles
|
4
4
|
has_many :role_memberships
|
5
|
-
has_many :roles, :through => :role_memberships
|
5
|
+
has_many :roles, :through => :role_memberships
|
6
|
+
has_attached_file :image,
|
7
|
+
:path => 'users/:id_:style.:extension',
|
8
|
+
:default_url => '/images/default_user_image.jpg',
|
9
|
+
:styles => {
|
10
|
+
:tiny => '150x200>',
|
11
|
+
:thumb => '300x400>',
|
12
|
+
:large => '600x800>'
|
13
|
+
}
|
6
14
|
attr_accessible :email, :first_name, :last_name, :username, :token, :password, :phone
|
7
15
|
|
8
16
|
before_save do
|
data/lib/caboose/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: caboose-cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.57
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Barry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|