Skip to content

Commit

Permalink
Rapid -- fix to <create-button> (from bronson)
Browse files Browse the repository at this point in the history
  • Loading branch information
tslocke committed May 19, 2008
1 parent 5d6cee0 commit e0fe146
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hobo/taglibs/rapid_forms.dryml
Expand Up @@ -260,9 +260,9 @@
if can_create?(new)
label ||= "New #{new.class.name.titleize}"
ajax_attributes = { :message => message }
ajax_attributes[:params] = { class_name => fields } unless fields.empty?
class_name = new.class.name.underscore
func = ajax_updater(object_url(new.class), message, update, ajax_attributes)
ajax_attributes[:params] = { class_name => fields } unless fields.empty?
func = ajax_updater(object_url(new.class), update, ajax_attributes)
element :input, add_classes(attributes.merge(:type =>'button', :onclick => func, :value => label),
"button create-button create-#{class_name}-button")
end
Expand Down

0 comments on commit e0fe146

Please sign in to comment.