Skip to content

Commit

Permalink
Switched to &block syntax for helpers to fix ERB issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowfiend authored and shadowfiend committed Jun 21, 2008
1 parent 771b233 commit dac2840
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/awesome_fields/lined_builder_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ module AwesomeFields
module LinedBuilderHelpers
# Behaves exactly the same as +form_for+, but ensures that the resulting
# builder object will be a +LinedBuilder+.
def lined_form_for(*args)
def lined_form_for(*args, &block)
opts = args.last.is_a?(Hash) ? args.pop : {}
opts[:builder] = LinedBuilder
args << opts
form_for(*args) { |f| yield f }
form_for(*args, &block)
end

# Behaves exactly the same as +fields_for+ but ensures that the resulting
# builder object will be a +LinedBuilder+.
def lined_fields_for(*args)
def lined_fields_for(*args, &block)
opts = args.last.is_a?(Hash) ? args.pop : {}
opts[:builder] = LinedBuilder
args << opts
fields_for(*args) { |f| yield f }
fields_for(*args, &block)
end
end
end

0 comments on commit dac2840

Please sign in to comment.