kuhsaft 2.4.1 → 2.4.2

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: df416454a2fc8feaec69668acb1dc75b61638487
4
- data.tar.gz: 4ea4cf641caca10198ac002188b208b3b90146ac
3
+ metadata.gz: 5add28c1486e71fff32b2b883f3f3185a7d33042
4
+ data.tar.gz: 3ac2da2de1aeecc79499b47781c0056be3f20b52
5
5
  SHA512:
6
- metadata.gz: 78555fc3c1b4da69aefb87a5ba6ef6ddd811ce641b20de2bf7f44823bb671faadd115367c8fcfb292dd63c6a916777ed2c93df416045ac0d3957fa8ae31fefed
7
- data.tar.gz: 6d7d8124045010d1137616d1916b987a4d074053a7fd07d7e97d62ed9dbfe6b5659393b54931af88e5a2f746ee1ed5032ffb17156b8043e309b4504be617e531
6
+ metadata.gz: a3a7994b1fcdeaa1749facc3ea026584e29f2db55bb2affd43968fe4ff8050ded804f2365dd8046fb5bc13ddf5670f7fc657ab1f6582e625ef319a3682247fe0
7
+ data.tar.gz: 5bd943bd95becf2d08536b855082cda2ae7114cb3be4ada3be61e5c8606d33f578a5536e5ec3d8ef8cf281e9c663c162f0c4b7d48e125973a0f7d19c4d3c3e80
@@ -15,7 +15,7 @@ module Kuhsaft
15
15
  end
16
16
 
17
17
  def translated_columns
18
- Kuhsaft::Page.column_names.select { |attr| attr.include?("_#{I18n.default_locale}") }
18
+ Kuhsaft::Page.column_names.select { |attr| attr.end_with? "_#{I18n.default_locale}" }
19
19
  end
20
20
 
21
21
  def formatted_locale
@@ -23,7 +23,7 @@ module Kuhsaft
23
23
  end
24
24
 
25
25
  def create_locale_migration_file
26
- migration_template('add_translation.html.erb',
26
+ migration_template('add_translation.erb',
27
27
  Rails.root.join('db', 'migrate', "add_#{formatted_locale}_translation.rb"))
28
28
  end
29
29
 
@@ -1,3 +1,3 @@
1
1
  module Kuhsaft
2
- VERSION = '2.4.1'
2
+ VERSION = '2.4.2'
3
3
  end
@@ -0,0 +1,8 @@
1
+ class Add<%= formatted_locale.camelize %>Translation < ActiveRecord::Migration
2
+
3
+ def change
4
+ <%- translated_columns.each do |column_hash| %>
5
+ add_column(:kuhsaft_pages, "<%= get_attribute column_hash %>", :<%= get_type column_hash %>) unless Kuhsaft::Page.column_names.include?("<%= get_attribute column_hash %>")
6
+ <%- end %>
7
+ end
8
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kuhsaft
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.1
4
+ version: 2.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Immanuel Häussermann
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2014-05-12 00:00:00.000000000 Z
15
+ date: 2014-05-19 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: rspec
@@ -657,7 +657,7 @@ files:
657
657
  - lib/templates/kuhsaft/assets/ck-config.js.coffee
658
658
  - lib/templates/kuhsaft/assets/customizations.css.sass
659
659
  - lib/templates/kuhsaft/assets/customizations.js.coffee
660
- - lib/templates/kuhsaft/translations/add_translation.html.erb
660
+ - lib/templates/kuhsaft/translations/add_translation.erb
661
661
  - vendor/assets/javascripts/bootstrap-modal-v2.js
662
662
  - vendor/assets/javascripts/bootstrap-modalmanager.js
663
663
  - vendor/assets/javascripts/jquery.nestable.js
@@ -1,8 +0,0 @@
1
- class Add<%= formatted_locale.classify %>Translation < ActiveRecord::Migration
2
-
3
- def change
4
- <%- translated_columns.each do |column_hash| %>
5
- add_column :kuhsaft_pages, "<%= get_attribute(column_hash).to_s %>", :<%= get_type(column_hash).to_sym %>
6
- <%- end %>
7
- end
8
- end