ecm_translations2 2.1.1 → 3.0.0

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: e313090995d5d4f2cba97f61f5b679fc2b8b0102
4
- data.tar.gz: e8e9b183378e5d2764d125c4fc31e1d3e76712a0
3
+ metadata.gz: afe29eecd98a2979449084f1e16d976feddd13ab
4
+ data.tar.gz: 51c4b5cefd682a86115a2276966013e2c7565410
5
5
  SHA512:
6
- metadata.gz: 6b2fcc9de298de9abac300fc5edb423bfc9eb0f6d1ff25289aca6abb2e47faaa2a195d0208adf84680eaeb11f3504333e3c2c6c4ff635823160850391739dea1
7
- data.tar.gz: 8bc0447e0bde7b6dbe0f5a5ee6a08113cdc65f8154bd0dd6690ffb57bc093534b6e6abcb88a3092f48d4af0c40314b537e210b07b9b9493e4b090b7e44fb9e00
6
+ metadata.gz: ceb3d18ad2111776b3ac7f59cab725385aea2047419542dc86c531c0ec2ab85e5e0f9c2d20c46f6f018fc15cda82ba814ca3c665b1318dde374aa83272108984
7
+ data.tar.gz: 10150bd58bc41f6304da2c0046bf10560c269865e8062ab404ab7a643960bab94820353d23dd1f21b353362a523d708c799e648cc0ad1fc0cf5cf68fb46f1f53
@@ -52,4 +52,4 @@ ActiveAdmin.register Ecm::Translations::Translation do
52
52
  end
53
53
  active_admin_comments
54
54
  end
55
- end
55
+ end if Gem::Specification.find_all_by_name('activeadmin').any?
@@ -1,6 +1,10 @@
1
1
  module Ecm::Translations
2
2
  class Translation < ActiveRecord::Base
3
3
 
4
+ # scopes
5
+ scope :not_translated, -> { where(value: nil) }
6
+ scope :is_proc, -> { where(is_proc: true) }
7
+
4
8
  # validations
5
9
  validates :locale, presence: true
6
10
  validates :key, presence: true, uniqueness: { scope: :locale }
@@ -10,7 +10,7 @@ module Ecm
10
10
  ActiveAdmin.setup do |config|
11
11
  config.load_paths << File.join(root, 'app/admin')
12
12
  end
13
- end
13
+ end if Gem::Specification.find_all_by_name('activeadmin').any?
14
14
  end
15
15
  end
16
16
  end
@@ -1,5 +1,5 @@
1
1
  module Ecm
2
2
  module Translations
3
- VERSION = '2.1.1'
3
+ VERSION = '3.0.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ecm_translations2
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roberto Vasquez Angel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-24 00:00:00.000000000 Z
11
+ date: 2016-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -341,3 +341,4 @@ signing_key:
341
341
  specification_version: 4
342
342
  summary: ECM Translations 2 Module.
343
343
  test_files: []
344
+ has_rdoc: