neorails-form_fu 0.4 → 0.5

Sign up to get free protection for your applications and to get access to all the features.
data/form_fu.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'form_fu'
3
- s.version = '0.4'
4
- s.date = '2008-07-06'
3
+ s.version = '0.5'
4
+ s.date = '2008-07-07'
5
5
 
6
6
  s.summary = "Build Nice DRY Rails Forms"
7
7
  s.description = "FormFu is a Rails plugin that enables you to easily build nice, tableless forms"
@@ -101,7 +101,8 @@ module FormFu
101
101
 
102
102
  if block_given?
103
103
  # concat to page if block was given
104
- return concat(output_html, block.binding)
104
+ @template.concat(output_html, block.binding)
105
+ return nil
105
106
  else
106
107
  # otherwise return html directly
107
108
  return output_html
@@ -1,10 +1,13 @@
1
1
  module FormFu
2
2
  module Helpers
3
3
  # Create a form_for block using FormFuBuilder
4
- def formfu_for(record_or_name_or_array, *args, &proc)
4
+ def formfu_for(record_or_name_or_array, *args, &block)
5
+ raise ArgumentError, "Missing block" unless block_given?
6
+
5
7
  options = args.extract_options!
6
8
  args << options.merge(:builder => FormFu::FormBuilder)
7
- form_for(record_or_name_or_array, *args, &proc)
9
+ form_for(record_or_name_or_array, *args, &block)
10
+
8
11
  end
9
12
 
10
13
  # also work with the more semantic name (build_form_for)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neorails-form_fu
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.4"
4
+ version: "0.5"
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tyler Crocker
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-07-06 00:00:00 -07:00
12
+ date: 2008-07-07 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency