formula 0.2.9 → 0.3.0

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.
Files changed (3) hide show
  1. data/lib/formula.rb +6 -4
  2. data/lib/formula/version.rb +1 -1
  3. metadata +1 -1
@@ -70,7 +70,7 @@ module Formula
70
70
  # Equivalent:
71
71
  #
72
72
  # <div class="block">
73
- # <%= f.submit(:name)
73
+ # <%= f.submit("Save")
74
74
  # </div>
75
75
 
76
76
  def button(value = nil, options = {})
@@ -109,12 +109,14 @@ module Formula
109
109
  # <div class="error">...</div>
110
110
  # </div>
111
111
 
112
- def block(method, options = {}, &block)
113
- options[:error] ||= error(method)
112
+ def block(method = nil, options = {}, &block)
113
+ options[:error] ||= error(method) if method
114
114
 
115
115
  components = "".html_safe
116
116
 
117
- components << self.label(method, options[:label]) unless options[:label] == false
117
+ if method
118
+ components << self.label(method, options[:label]) if options[:label] or options[:label].nil? and method
119
+ end
118
120
 
119
121
  components << @template.capture(&block)
120
122
 
@@ -1,3 +1,3 @@
1
1
  module Formula
2
- VERSION = "0.2.9"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: formula
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.9
4
+ version: 0.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: