public
Description: A Rails plugin to improve forms. Includes a better FormBuilder and DRYness for form fields.
Homepage: http://blog.withoutincident.com
Clone URL: git://github.com/Shadowfiend/awesome_fields.git
Switched to &block syntax for helpers to fix ERB issues.
shadowfiend (author)
Sat Jun 21 11:49:17 -0700 2008
commit  dac28408018d545fd90296ea3935eefa529fe1d6
tree    b9c82e705dc349a3acd361d0311b0446fa8d3713
parent  771b2336f77942b8a499992674bfe557486ca8a4
...
5
6
7
8
 
9
10
11
12
 
13
14
15
16
17
 
18
19
20
21
 
22
23
24
...
5
6
7
 
8
9
10
11
 
12
13
14
15
16
 
17
18
19
20
 
21
22
23
24
0
@@ -5,20 +5,20 @@ module AwesomeFields
0
   module LinedBuilderHelpers
0
     # Behaves exactly the same as +form_for+, but ensures that the resulting
0
     # builder object will be a +LinedBuilder+.
0
- def lined_form_for(*args)
0
+ def lined_form_for(*args, &block)
0
       opts = args.last.is_a?(Hash) ? args.pop : {}
0
       opts[:builder] = LinedBuilder
0
       args << opts
0
- form_for(*args) { |f| yield f }
0
+ form_for(*args, &block)
0
     end
0
 
0
     # Behaves exactly the same as +fields_for+ but ensures that the resulting
0
     # builder object will be a +LinedBuilder+.
0
- def lined_fields_for(*args)
0
+ def lined_fields_for(*args, &block)
0
       opts = args.last.is_a?(Hash) ? args.pop : {}
0
       opts[:builder] = LinedBuilder
0
       args << opts
0
- fields_for(*args) { |f| yield f }
0
+ fields_for(*args, &block)
0
     end
0
   end
0
 end

Comments

    No one has commented yet.