infopark_rails_connector_meta 1.9.0.beta → 1.9.0.beta2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 95caf99efef6235ea30ebefda284ed773384de36
4
- data.tar.gz: bbcd647d0b122e553ebda86759120d26720405e8
3
+ metadata.gz: 991207e52ca8fcbd9f8f961ba04d3ccb2960aabc
4
+ data.tar.gz: 125c3cc2313d5f6a4eeca15d4b3f965455b95ac8
5
5
  SHA512:
6
- metadata.gz: 6f813e9ba4b8d47e64b655edebfb59c64ca92fe4880aabff945881ae8696f617a577482a5d0d78752fedd256210b3ec049134223c5d2cbc3bf099f6b87ecf8d3
7
- data.tar.gz: 8634c4da730538a3bd140af55783eab0430642640eaa6433cb390b7b42f8e0a4e271047dfeaf398935015c11c4ba19c7991904ecc3e3df8df54f87ca769148e2
6
+ metadata.gz: f1de497eab3005a87129ff7f1c7527c2f5e27b1bf4926acf763ca8e5543400eeed4ed5757d57506c841a824bb28c5c7071d7cec78b36072d780a40b01dfbb6a3
7
+ data.tar.gz: 9c05ec31bf3303fd155fea3b37339f319997d30e711a925478dc39e9c97e569d827829ad6b33bccd1a6b4df9a1c115a37bc5da1134fb86c8ff70edbc96501076
@@ -10,8 +10,18 @@ module RailsConnector
10
10
 
11
11
  has_many :news, :class_name => 'News', :foreign_key => 'channel_name'
12
12
 
13
- has_many :active_news, :class_name => 'News', :foreign_key => 'channel_name',
14
- :conditions => ['valid_from <= :now AND valid_until >= :now', {:now => Time.now.to_s(:number)}]
13
+ if ::Rails::VERSION::MAJOR == 4
14
+
15
+ has_many :active_news,
16
+ lambda { where(['valid_from <= :now AND valid_until >= :now', {:now => Time.now.to_s(:number)}]) },
17
+ :class_name => 'News', :foreign_key => 'channel_name'
18
+
19
+ elsif ::Rails::VERSION::MAJOR == 3
20
+
21
+ has_many :active_news, :class_name => 'News', :foreign_key => 'channel_name',
22
+ :conditions => ['valid_from <= :now AND valid_until >= :now', {:now => Time.now.to_s(:number)}]
23
+
24
+ end
15
25
 
16
26
  has_many :objects, :through => :news
17
27
 
data/lib/meta/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module RailsConnector
3
3
  module Meta
4
- VERSION = "1.9.0.beta"
4
+ VERSION = "1.9.0.beta2"
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: infopark_rails_connector_meta
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.0.beta
4
+ version: 1.9.0.beta2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomasz Przedmojski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-02 00:00:00.000000000 Z
11
+ date: 2014-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -112,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
112
  version: 1.3.1
113
113
  requirements: []
114
114
  rubyforge_project:
115
- rubygems_version: 2.0.3
115
+ rubygems_version: 2.0.14
116
116
  signing_key:
117
117
  specification_version: 4
118
118
  summary: Meta Information on CMS Objects