ish_models 0.0.33.30 → 0.0.33.31
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ish_models/stock_watch.rb +14 -3
- data/lib/ish_models/user_profile.rb +2 -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: 8bc52706ccbe2c0f4eea769079e009ae0b8b12f3
|
4
|
+
data.tar.gz: 7d1b2f63e0a8c7532f5e15a91807b947db5dd47f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f4f0a06c7561bbbdae6dc0b1abb194e97318573cb9c9ec02ffa844e552ecbe9e912cfc9aa65289ba3a3b505fa7633508dc7e1a429b8677a0b066e5d100c5e37
|
7
|
+
data.tar.gz: 372c31c04a48c7e2ebf0575d013a5b8335ef35d06df548997719af0ffcb4d1bbe7182eb3bbbdf84c7b9efd61bd86985b0d36b2011e785439ab2d5aa6aca26cd8
|
@@ -5,11 +5,20 @@ class IshModels::StockWatch
|
|
5
5
|
|
6
6
|
field :ticker
|
7
7
|
|
8
|
-
NOTIFICATION_TYPES = [ :
|
8
|
+
NOTIFICATION_TYPES = [ :NONE, :EMAIL, :SMS ]
|
9
|
+
NOTIFICATION_NONE = :NONE
|
9
10
|
NOTIFICATION_EMAIL = :EMAIL
|
10
11
|
NOTIFICATION_SMS = :SMS
|
11
|
-
|
12
|
-
field :notification_type, :type => Symbol
|
12
|
+
ACTIONS = NOTIFICATION_TYPES
|
13
|
+
field :notification_type, :type => Symbol, :as => :action
|
14
|
+
=begin
|
15
|
+
def action
|
16
|
+
return notification_type
|
17
|
+
end
|
18
|
+
def action= which
|
19
|
+
notification_type = which
|
20
|
+
end
|
21
|
+
=end
|
13
22
|
|
14
23
|
field :price, :type => Float
|
15
24
|
|
@@ -18,4 +27,6 @@ class IshModels::StockWatch
|
|
18
27
|
DIRECTION_BELOW = :BELOW
|
19
28
|
field :direction, :type => Symbol
|
20
29
|
|
30
|
+
belongs_to :profile, :class_name => 'IshModels::UserProfile'
|
31
|
+
|
21
32
|
end
|