ish_models 0.0.33.253 → 0.0.33.255
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ish/email_context.rb +7 -0
- data/lib/newsitem.rb +10 -14
- data/lib/newsitem.rb-trash +11 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bfe384f589610c6971200b16e7e611573f61eb750559b397cf424a67e54ad7e0
|
4
|
+
data.tar.gz: 3b12ccdb43b9f83eb8e7422efb13a5bd688b9916348f6335b6394e89b6a189d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b752d52743f60fbe874767935afc97a45e80d551f784cce94768a2fecb7cebba84f44deaf4500d7c9952be26d38fdae3b3974f832e7a5efcc37df0211ddf87bd
|
7
|
+
data.tar.gz: b4e1ad85ee6abb235799ff766b582523376568263d649fb3ac16ecdab2f3814639c43edc201c34e9e1c87c3a158ddaa7c118ddc998675960ccbe1b37a7870d3f
|
data/lib/ish/email_context.rb
CHANGED
@@ -30,6 +30,13 @@ class ::Ish::EmailContext
|
|
30
30
|
PAGE_PARAM_NAME = 'email_contexts_page'
|
31
31
|
|
32
32
|
field :from_email
|
33
|
+
def from_email
|
34
|
+
if self[:from_email].presence
|
35
|
+
return self[:from_email]
|
36
|
+
else
|
37
|
+
return tmpl.from_email
|
38
|
+
end
|
39
|
+
end
|
33
40
|
# validates_presence_of :from_email
|
34
41
|
|
35
42
|
field :subject
|
data/lib/newsitem.rb
CHANGED
@@ -23,23 +23,20 @@ class Newsitem
|
|
23
23
|
|
24
24
|
field :name
|
25
25
|
field :descr
|
26
|
-
def description
|
27
|
-
descr
|
28
|
-
end
|
26
|
+
def description; descr; end
|
29
27
|
field :subhead
|
30
28
|
|
31
|
-
field :image_path
|
32
|
-
field :link_path
|
33
|
-
field :username
|
34
|
-
field :partial_name
|
35
|
-
|
36
29
|
field :weight, :type => Integer, :default => 10
|
37
30
|
field :n_upvotes, :type => Integer, :default => 0
|
38
31
|
field :n_downvotes, :type => Integer, :default => 0
|
39
32
|
field :upvoting_users, :type => Array, :default => []
|
40
33
|
field :downvoting_users, :type => Array, :default => []
|
41
|
-
field :is_feature, :type => Boolean, :default => false
|
42
34
|
|
35
|
+
field :image_path # @deprecated ?
|
36
|
+
field :link_path # @deprecated ?
|
37
|
+
field :iframe_src
|
38
|
+
|
39
|
+
## This is used.
|
43
40
|
TYPE_GALLERY = :type_gallery
|
44
41
|
TYPE_PHOTO = :type_photo
|
45
42
|
TYPE_REPORT = :type_report
|
@@ -51,9 +48,6 @@ class Newsitem
|
|
51
48
|
return TYPE_VIDEO if video_id
|
52
49
|
end
|
53
50
|
|
54
|
-
|
55
|
-
PER_PAGE = 6
|
56
|
-
|
57
51
|
default_scope ->{ order_by({ :created_at => :desc }) }
|
58
52
|
|
59
53
|
def self.from_params item
|
@@ -77,11 +71,13 @@ class Newsitem
|
|
77
71
|
def export_fields
|
78
72
|
%w|
|
79
73
|
descr
|
80
|
-
|
74
|
+
name
|
75
|
+
|
81
76
|
image_path
|
82
77
|
link_path
|
78
|
+
|
83
79
|
map_id
|
84
|
-
|
80
|
+
gallery_id
|
85
81
|
photo_id
|
86
82
|
report_id
|
87
83
|
video_id
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ish_models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.33.
|
4
|
+
version: 0.0.33.255
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piousbox
|
@@ -158,6 +158,7 @@ files:
|
|
158
158
|
- lib/mongoid/votable.rb
|
159
159
|
- lib/mongoid/voter.rb
|
160
160
|
- lib/newsitem.rb
|
161
|
+
- lib/newsitem.rb-trash
|
161
162
|
- lib/office/action.rb
|
162
163
|
- lib/office/action_tie.rb
|
163
164
|
- lib/office/email_action.rb
|