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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ish/lead.rb +9 -0
  3. data/lib/tag.rb +3 -1
  4. data/lib/venue.rb +5 -2
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b52df6c233f955d2a2ea3edd9ec7e127c463d19e
4
- data.tar.gz: 05d0a8cb907b92bd9ae3c42f07bc848878f0232d
3
+ metadata.gz: 3d4dc0b4818163cc99fb0267851057d0643118ef
4
+ data.tar.gz: c1ef623fa896a0d37b4fcdd8d37ce978015ce00c
5
5
  SHA512:
6
- metadata.gz: 29724d165d626e83e35d78dfd4d6d926e53a83daedf722051d4bd0d5b361db4b8027d3a0e103bef0c6c7071002569c9727731abc12daac68f7b84b7b4a0d5027
7
- data.tar.gz: caaed0c9de4d7e426c62c4fef135a111036d998796e870598428d58c98e68af477b5abc33ae6aaf82bedc0a5e82efa176fbe26dbe2e6c655f30453a59b447a8f
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 :descr, :type => String
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, ->{ where({ :is_public => true }) }
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
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.61
4
+ version: 0.0.33.62
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox