ish_models 0.0.33.61 → 0.0.33.62
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ish/lead.rb +9 -0
- data/lib/tag.rb +3 -1
- data/lib/venue.rb +5 -2
- 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: 3d4dc0b4818163cc99fb0267851057d0643118ef
|
4
|
+
data.tar.gz: c1ef623fa896a0d37b4fcdd8d37ce978015ce00c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a20d0d518c6c3ba3528db381acd8e3aefcf3426fc231a7021fb99531cf10412720a772aa0278be0c6f71e192283915556dc2bc205a26a9b25e364ef72cddcc3b
|
7
|
+
data.tar.gz: a723741c9441d74edbea98b9a74698f486502d3ceccc0357b6b62599c1941493d8ded8c6a4d1496b21f91efb51bcac01cfd6df5b88206b83065e8a5dde18100d
|
data/lib/ish/lead.rb
CHANGED
@@ -16,6 +16,8 @@ class Ish::Lead
|
|
16
16
|
|
17
17
|
field :email
|
18
18
|
field :job_url
|
19
|
+
field :company_url
|
20
|
+
field :yelp_url
|
19
21
|
|
20
22
|
field :company, :default => ''
|
21
23
|
validates_uniqueness_of :company
|
@@ -33,4 +35,11 @@ class Ish::Lead
|
|
33
35
|
field :tag # 'hired_com_ror', not enumerated for now _vp_ 20180103
|
34
36
|
field :location
|
35
37
|
|
38
|
+
field :raw_phone, :type => String
|
39
|
+
def phone= which
|
40
|
+
write_attribute :raw_phone, which
|
41
|
+
write_attribute :phone, which.gsub(/\D/, '').to_i
|
42
|
+
end
|
43
|
+
field :phone, :type => Integer
|
44
|
+
|
36
45
|
end
|
data/lib/tag.rb
CHANGED
@@ -30,6 +30,8 @@ class Tag
|
|
30
30
|
belongs_to :site, :optional => true
|
31
31
|
belongs_to :city, :optional => true
|
32
32
|
|
33
|
+
has_and_belongs_to_many :venues
|
34
|
+
|
33
35
|
default_scope ->{
|
34
36
|
where({ :is_public => true, :is_trash => false }).order_by({ :name => :asc })
|
35
37
|
}
|
@@ -52,7 +54,7 @@ class Tag
|
|
52
54
|
|
53
55
|
def self.list
|
54
56
|
out = Tag.unscoped.order_by( :name => :asc )
|
55
|
-
return( [['', nil]] + out.map { |item| [ item.name, item.id ] } )
|
57
|
+
return( [['', nil, :disabled => true]] + out.map { |item| [ item.name, item.id ] } )
|
56
58
|
end
|
57
59
|
|
58
60
|
# @deprecated, there will be no reports or galleries in tags. There will be only features and newsitems
|
data/lib/venue.rb
CHANGED
@@ -8,14 +8,15 @@ class Venue
|
|
8
8
|
field :name_seo, :type => String
|
9
9
|
validates :name_seo, :uniqueness => true, :allow_nil => false
|
10
10
|
|
11
|
-
field :
|
11
|
+
field :subhead
|
12
|
+
field :descr
|
12
13
|
|
13
14
|
field :is_trash, :type => Boolean, :default => false
|
14
15
|
scope :fresh, ->{ where({ :is_trash => false }) }
|
15
16
|
scope :trash, ->{ where({ :is_trash => true }) }
|
16
17
|
|
17
18
|
field :is_public, :type => Boolean, :default => true
|
18
|
-
scope :public,
|
19
|
+
scope :public, ->{ where({ :is_public => true }) }
|
19
20
|
scope :not_public, ->{ where({ :is_public => false }) }
|
20
21
|
|
21
22
|
field :is_feature, :type => Boolean, :default => false
|
@@ -29,6 +30,8 @@ class Venue
|
|
29
30
|
# belongs_to :owner, :class_name => 'User', :inverse_of => :owned_venue
|
30
31
|
validates :city, :allow_nil => false, :presence => true
|
31
32
|
|
33
|
+
has_and_belongs_to_many :tags
|
34
|
+
|
32
35
|
has_and_belongs_to_many :users
|
33
36
|
|
34
37
|
has_one :profile_photo, :class_name => 'Photo', :inverse_of => :profile_venue
|