preciousss 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -11,6 +11,8 @@ View Helpers
11
11
  is_bot?
12
12
  bot_id
13
13
  years_range
14
+ extract_locale_from_subdomain
15
+ extract_locale_from_tld
14
16
 
15
17
  Validators
16
18
  ----------
@@ -42,7 +42,7 @@ module Preciousss
42
42
 
43
43
  unless object_errors.empty?
44
44
  options[:class] ||= 'errors'
45
- options[:id] ||= objects.map{|object| object.class.name.underscore}.join('-') + '-errors'
45
+ options[:id] ||= objects.map{|object| object.class.name.underscore}.join('_') + '_errors'
46
46
  options[:title] = I18n.t('activerecord.errors.template.header', :model => objects.map{|object| object.class.human}.to_sentence, :count => object_errors.size) if options[:title] === true
47
47
 
48
48
  I18n.with_options :locale => options[:locale], :scope => [:activerecord, :errors, :template] do |locale|
@@ -58,7 +58,7 @@ module Preciousss
58
58
  end
59
59
  end
60
60
 
61
- private ########################################################################################################
61
+ protected ######################################################################################################
62
62
 
63
63
  # Get locale from top-level domain or return nil if such locale is not available
64
64
  # You have to put something like:
@@ -1,3 +1,3 @@
1
1
  module Preciousss
2
- VERSION = '0.0.10'
2
+ VERSION = '0.0.11'
3
3
  end
@@ -3,19 +3,19 @@ module Preciousss
3
3
  module ActionView
4
4
 
5
5
  def body_class
6
- qualified_controller_name = controller.controller_path.gsub('/', '-')
7
- "#{qualified_controller_name} #{controller.action_name} #{qualified_controller_name}-#{controller.action_name} #{I18n.locale}"
6
+ qualified_controller_name = controller.controller_path.gsub('/', '_')
7
+ "#{qualified_controller_name} #{controller.action_name} #{qualified_controller_name}_#{controller.action_name} #{I18n.locale}"
8
8
  end
9
9
 
10
10
  def body_id
11
- "#{controller.controller_path.gsub('/', '-')}-body"
11
+ "#{controller.controller_path.gsub('/', '_')}_body"
12
12
  end
13
13
 
14
14
  def flash_messages
15
15
  return if flash.blank?
16
16
 
17
- content_tag(:div, :class => "flash-messages #{flash.keys.map{|key| "with-#{key}"}.join(' ')}") do
18
- flash.map{|key, value| content_tag(:p, content_tag(:span, value), :class => "flash-#{key}")}.join.html_safe
17
+ content_tag(:div, :class => "flash_messages #{flash.keys.map{|key| "with_#{key}"}.join(' ')}") do
18
+ flash.map{|key, value| content_tag(:p, content_tag(:span, value), :class => "flash_#{key}")}.join.html_safe
19
19
  end
20
20
  end
21
21
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: preciousss
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 9
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 10
10
- version: 0.0.10
9
+ - 11
10
+ version: 0.0.11
11
11
  platform: ruby
12
12
  authors:
13
13
  - sodercober
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-03-30 00:00:00 +00:00
18
+ date: 2011-03-31 00:00:00 +00:00
19
19
  default_executable:
20
20
  dependencies: []
21
21