lib/lolita-translation/lolita/component_hooks.rb in lolita-translation-0.6.3 vs lib/lolita-translation/lolita/component_hooks.rb in lolita-translation-0.7.0

- old
+ new

@@ -5,25 +5,25 @@ end end Lolita::Hooks.component(:"/lolita/configuration/tab/fields").after do tab = self.component_locals[:tab] - if tab.translatable? + if tab.translatable? self.render_component tab.build_translations_nested_form(self.resource) end end Lolita::Hooks.component(:"/lolita/configuration/tab/fields").around do tab = self.component_locals[:tab] if tab.translatable? content = nil - resource.in(resource.original_locale) do + resource.in(resource.original_locale) do content = let_content end self.send(:render_component,"lolita/translation",:language_wrap, { - :tab => tab, - :content => content, + :tab => tab, + :content => content, :active => true, :translation_locale => resource.original_locale }) else let_content @@ -32,11 +32,11 @@ Lolita::Hooks.component(:"/lolita/configuration/nested_form/fields").around do tab = self.component_locals[:nested_form].parent if tab.translatable? && current_form.object.respond_to?(:locale) self.send(:render_component,"lolita/translation",:language_wrap, { - :tab => tab, - :content => let_content, + :tab => tab, + :content => let_content, :active => false, :translation_locale => current_form.object.locale }) else let_content \ No newline at end of file