storefront 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Rakefile CHANGED
@@ -5,7 +5,7 @@ require 'rake/gempackagetask'
5
5
  spec = Gem::Specification.new do |s|
6
6
  s.name = "storefront"
7
7
  s.authors = ["Lance Pollard"]
8
- s.version = "0.3.0"
8
+ s.version = "0.3.1"
9
9
  s.description = "Semantic HTML5 for Rails"
10
10
  s.summary = "A simple and semantic FormBuilder, TableBuilder, Locale Interpolator, and Widget API for Rails 3"
11
11
  s.homepage = "http://github.com/viatropos/storefront"
@@ -36,13 +36,13 @@ module Storefront
36
36
 
37
37
  unless [:hidden, :submit].include?(input_type)
38
38
  # errors
39
- @errors = Storefront::Form::Errors.new(options.slice(:error_html, :error, :model, :index, :parent_index, :attribute, :template))
39
+ @errors = Storefront::Form::Errors.new(options.slice(:rich_input, :error_html, :error, :model, :index, :parent_index, :attribute, :template))
40
40
 
41
41
  # label
42
- @label = Storefront::Form::Label.new(options.slice(:label_html, :label, :model, :index, :parent_index, :attribute, :template))
42
+ @label = Storefront::Form::Label.new(options.slice(:rich_input, :label_html, :label, :model, :index, :parent_index, :attribute, :template))
43
43
 
44
44
  # hint
45
- @hints = Storefront::Form::Hint.new(options.slice(:hint_html, :hint, :model, :index, :parent_index, :attribute, :template))
45
+ @hints = Storefront::Form::Hint.new(options.slice(:rich_input, :hint_html, :hint, :model, :index, :parent_index, :attribute, :template))
46
46
  end
47
47
 
48
48
  unless input_type == :fieldset
@@ -37,6 +37,7 @@ module Storefront
37
37
  @include_blank = options[:include_blank] != false
38
38
  @value = options[:value]
39
39
  @dynamic = options[:dynamic] == true
40
+ @rich_input = options.has_key?(:rich_input) ? !!options[:rich_input] : config.rich_input
40
41
 
41
42
  classes = [input_type, self.class.name.split("::").last.underscore, attribute.name.to_s.underscore.strip.gsub(/[_\s]+/, config.separator)]
42
43
 
@@ -11,7 +11,7 @@ module Storefront
11
11
  end
12
12
 
13
13
  def submit_input
14
- if config.rich_input
14
+ if @rich_input
15
15
  rich_input :submit
16
16
  else
17
17
  simple_input :submit
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: storefront
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.3.0
5
+ version: 0.3.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Lance Pollard
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-07-06 00:00:00 Z
13
+ date: 2011-07-07 00:00:00 Z
14
14
  dependencies: []
15
15
 
16
16
  description: Semantic HTML5 for Rails