ish_models 0.0.33.17 → 0.0.33.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/newsitem.rb +2 -1
- data/lib/site.rb +1 -1
- data/lib/venue.rb +9 -3
- data/lib/video.rb +3 -3
- 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: b609b07fe0e541e0cf8a0ffa27e7fbfacb506e61
|
4
|
+
data.tar.gz: 30a517868465f6e73bc46f9d73c1a7722ae3ae28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5021586006c10d09825173891d8bfd98e22eea5bf71743e3ceb248fb5951746572f4914eee2b1e49e094b6cf4edbdd56aecb83f7fa35780f8aa13f2b1f4be651
|
7
|
+
data.tar.gz: 2be6c015956ca93f196a6eb580550f249f67f90ff51ecc5ede25ff914884c92e91baf4d761cc4c3b32c58639dac1e51422f690bfead2e2fd740fef3fcdd6cd27
|
data/lib/newsitem.rb
CHANGED
data/lib/site.rb
CHANGED
@@ -60,7 +60,7 @@ class Site
|
|
60
60
|
# manager uses it.
|
61
61
|
def self.list
|
62
62
|
out = self.all.order_by( :domain => :asc, :lang => :asc )
|
63
|
-
[['', nil]] + out.map { |item| [ "#{item.domain} #{item.lang}", item.id ] }
|
63
|
+
[['Select Site', nil, { :disabled => true }]] + out.map { |item| [ "#{item.domain} #{item.lang}", item.id ] }
|
64
64
|
end
|
65
65
|
|
66
66
|
def self.mobi
|
data/lib/venue.rb
CHANGED
@@ -26,7 +26,7 @@ class Venue
|
|
26
26
|
field :lang, :type => String, :default => 'en'
|
27
27
|
|
28
28
|
belongs_to :city
|
29
|
-
belongs_to :owner, :class_name => 'User', :inverse_of => :owned_venue
|
29
|
+
# belongs_to :owner, :class_name => 'User', :inverse_of => :owned_venue
|
30
30
|
validates :city, :allow_nil => false, :presence => true
|
31
31
|
|
32
32
|
has_and_belongs_to_many :users
|
@@ -45,8 +45,14 @@ class Venue
|
|
45
45
|
[['', nil]] + out.map { |item| [ item.name, item.id ] }
|
46
46
|
end
|
47
47
|
|
48
|
-
set_callback
|
49
|
-
doc.name_seo = doc.name.
|
48
|
+
set_callback :create, :before do |doc|
|
49
|
+
doc.name_seo = doc.name.gsub(' ', '-')
|
50
|
+
end
|
51
|
+
|
52
|
+
set_callback :save, :before do |doc|
|
53
|
+
if doc.city
|
54
|
+
city.touch
|
55
|
+
end
|
50
56
|
end
|
51
57
|
|
52
58
|
def self.types
|
data/lib/video.rb
CHANGED
@@ -21,13 +21,13 @@ class Video
|
|
21
21
|
field :youtube_id, :type => String
|
22
22
|
validates :youtube_id, :uniqueness => true, :presence => true
|
23
23
|
|
24
|
-
belongs_to :tag
|
25
|
-
belongs_to :city
|
24
|
+
belongs_to :tag, :optional => true
|
25
|
+
belongs_to :city, :optional => true
|
26
26
|
belongs_to :site
|
27
27
|
validates :site, :presence => true
|
28
28
|
belongs_to :user
|
29
29
|
validates :user, :presence => true
|
30
|
-
|
30
|
+
has_many :newsitems
|
31
31
|
|
32
32
|
accepts_nested_attributes_for :site, :tag, :city
|
33
33
|
|