Skip to content

Commit

Permalink
moved the tags to models, appending _form instead of prefixing
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkkelly committed Apr 1, 2010
1 parent 5afaaf2 commit 0eecc3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/form_tags.rb → app/models/form_tags.rb
Expand Up @@ -9,7 +9,7 @@ class TagError < StandardError; end
results = []
if name = tag.attr['name']
if tag.locals.form = Form.first(:first, :conditions => {:title => name.strip})
tag.attr['id'] ||= "form_" + tag.locals.form.title
tag.attr['id'] ||= tag.locals.form.title + "_form"
tag.attr['method'] ||= "post"
tag.attr['action'] = tag.locals.form.action.empty? ? "/form/"+tag.locals.form.id.to_s : tag.locals.form.action

Expand Down

0 comments on commit 0eecc3e

Please sign in to comment.