spree_simple_product_translations 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/batch_translation.rb +3 -2
- metadata +5 -7
data/lib/batch_translation.rb
CHANGED
@@ -5,13 +5,14 @@ module ActionView
|
|
5
5
|
class FormBuilder
|
6
6
|
def globalize_fields_for(locale, *args, &proc)
|
7
7
|
raise ArgumentError, "Missing block" unless block_given?
|
8
|
+
options = args.extract_options!
|
8
9
|
@index = @index ? @index + 1 : 1
|
9
10
|
object_name = "#{@object_name}[translations_attributes][#{@index}]"
|
10
11
|
form_object = @object || @object_name.to_s.camelize.constantize.new
|
11
|
-
object = form_object.translations.select{|t| t.locale.to_s == locale}.first || form_object.translations.find_by_locale(locale
|
12
|
+
object = form_object.translations.select{|t| t.locale.to_s == locale}.first || form_object.translations.find_by_locale(locale)
|
12
13
|
@template.concat @template.hidden_field_tag("#{object_name}[id]", object ? object.id : "")
|
13
14
|
@template.concat @template.hidden_field_tag("#{object_name}[locale]", locale)
|
14
|
-
@template.fields_for(object_name, object,
|
15
|
+
@template.fields_for(object_name, object, options, &proc)
|
15
16
|
end
|
16
17
|
end
|
17
18
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_simple_product_translations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 6
|
10
|
+
version: 0.0.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jeroen Jacobs
|
@@ -15,8 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
19
|
-
default_executable:
|
18
|
+
date: 2011-05-05 00:00:00 Z
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|
22
21
|
name: spree_core
|
@@ -86,7 +85,6 @@ files:
|
|
86
85
|
- public/stylesheets/smoothness/images/ui-icons_888888_256x240.png
|
87
86
|
- public/stylesheets/smoothness/images/ui-icons_cd0a0a_256x240.png
|
88
87
|
- public/stylesheets/smoothness/jquery-ui-1.7.3.custom.css
|
89
|
-
has_rdoc: false
|
90
88
|
homepage: https://github.com/jeroenj/spree-simple_product_translations
|
91
89
|
licenses: []
|
92
90
|
|
@@ -118,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
118
116
|
requirements:
|
119
117
|
- none
|
120
118
|
rubyforge_project:
|
121
|
-
rubygems_version: 1.
|
119
|
+
rubygems_version: 1.8.0
|
122
120
|
signing_key:
|
123
121
|
specification_version: 3
|
124
122
|
summary: Spree Extension that adds an intuitive way to translate product details in the backend
|