lib/world_flags/helper/view/util.rb in world-flags-0.5.1 vs lib/world_flags/helper/view/util.rb in world-flags-0.6.0

- old
+ new

@@ -7,11 +7,11 @@ when true name when String options[:content] else - ' ' + WorldFlags.flag_text end end def self.title_for name, options = {} case options[:title] @@ -32,13 +32,14 @@ language_name = WorldFlags.language(code, locale) country_name = WorldFlags.country(code, locale) # add semi class if not selected semi = (selected.blank? ? ' semi' : '') if options[:with_semi] + xclass = options[:class] ? " #{options[:class]}" : '' flag_locale = WorldFlags.locale(code) - {:class => "flag #{code}#{selected}#{semi}", :'data-country_name' => country_name, :'data-language_name' => language_name, :'data-cc' => code, :'data-locale' => flag_locale}.merge(options[:html] || {}).merge(extra_options) + {:class => "flag #{code}#{selected}#{semi}#{xclass}", :'data-country_name' => country_name, :'data-language_name' => language_name, :'data-cc' => code, :'data-locale' => flag_locale}.merge(options[:html] || {}).merge(extra_options) end def self.flag_selected? code, options = {} code = code.to_sym sel = options[:selected] || options[code] \ No newline at end of file