ish_models 0.0.33.55 → 0.0.33.56
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 +4 -4
- data/lib/co_tailors/order_item.rb +5 -15
- data/lib/co_tailors/profile_measurement.rb +12 -11
- data/lib/ish_models/user_profile.rb +2 -3
- data/lib/ish_models.rb +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ec36a7ec96c7cc127814d266948e4466557238c
|
4
|
+
data.tar.gz: 614f9a67f26dc14161695bf12c5931c6b9880100
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e22da2237fc2baf1d32b322713dcf539796bd834be2906f70d355b79c2886084d98c2c103ab697a41f3da396837ba9d163fc94ca67fa72c0a04cd078a55d4e7
|
7
|
+
data.tar.gz: 6d3ec6e87c11e51d9654badcba7a083203f4ccfcc4939f938e5dbb7b0746249150d8e7ee2145194f4fdff9a6882f1c09153450ae0ef016e50d20255dbd2d2b58
|
@@ -3,25 +3,15 @@ class CoTailors::OrderItem
|
|
3
3
|
include Mongoid::Document
|
4
4
|
include Mongoid::Timestamps
|
5
5
|
|
6
|
-
belongs_to :order, :class_name => '::
|
6
|
+
belongs_to :order, :class_name => 'CoTailors::Order'
|
7
7
|
|
8
8
|
KINDS = [ :shirt, :pants, :suit ]
|
9
9
|
field :kind, :type => Symbol
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
# sleeve length
|
16
|
-
# shoulder width
|
17
|
-
# shirt length
|
18
|
-
# bicep around
|
19
|
-
# wrist around
|
20
|
-
|
21
|
-
## pants
|
22
|
-
# length
|
23
|
-
# waist
|
24
|
-
# hips
|
11
|
+
FABRICS = [ :white, :black, :light_blue, :dark_blue, :dark_green, :pink, :gray ]
|
12
|
+
field :fabric, :type => Symbol
|
13
|
+
|
14
|
+
has_one :measurement, :class_name => 'CoTailors::ProfileMeasurement'
|
25
15
|
|
26
16
|
end
|
27
17
|
|
@@ -6,24 +6,25 @@ class CoTailors::ProfileMeasurement
|
|
6
6
|
UNITS = [ :inches, :centimeters ]
|
7
7
|
field :units, :type => Symbol
|
8
8
|
|
9
|
-
belongs_to :profile,
|
9
|
+
belongs_to :profile, :class_name => 'IshModels::UserProfile'
|
10
|
+
belongs_to :order_item, :class_name => 'CoTailors::OrderItem'
|
10
11
|
|
11
|
-
## same as order item
|
12
12
|
## shirt
|
13
|
-
|
14
|
-
field :
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
# wrist around
|
13
|
+
field :neck_around, :type => Float
|
14
|
+
field :chest_around, :type => Float
|
15
|
+
field :waist_around, :type => Float
|
16
|
+
field :sleeve_length, :type => Float
|
17
|
+
field :shoulder_width, :type => Float
|
18
|
+
field :shirt_length, :type => Float
|
19
|
+
field :bicep_around, :type => Float
|
20
|
+
field :wrist_around, :type => Float
|
22
21
|
## pants
|
23
22
|
# length
|
24
23
|
# waist
|
25
24
|
# hips
|
26
25
|
## suit
|
27
26
|
|
27
|
+
field :nickname
|
28
|
+
|
28
29
|
end
|
29
30
|
|
@@ -52,7 +52,6 @@ class IshModels::UserProfile
|
|
52
52
|
#
|
53
53
|
field :videos_embed, :type => Boolean, :default => false
|
54
54
|
|
55
|
-
|
56
55
|
def sudoer?
|
57
56
|
%w( piousbox@gmail.com manager@gmail.com ).include?( self.user.email ) ? true : false
|
58
57
|
end
|
@@ -66,7 +65,7 @@ class IshModels::UserProfile
|
|
66
65
|
|
67
66
|
# colombia tailors
|
68
67
|
has_many :measurements, :class_name => '::CoTailors::ProfileMeasurement'
|
69
|
-
has_many :addresses,
|
70
|
-
has_many :
|
68
|
+
has_many :addresses, :class_name => '::CoTailors::Address'
|
69
|
+
has_many :orders, :class_name => '::CoTailors::Order'
|
71
70
|
|
72
71
|
end
|
data/lib/ish_models.rb
CHANGED