Created
August 18, 2010 21:42
-
-
Save mdeering/536277 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SchoolManagerHooks < Spree::ThemeSupport::HookListener | |
# Hook is getting called as expected in the user form. | |
# http://github.com/railsdog/spree/blob/0-11-stable/vendor/extensions/theme_default/app/views/shared/_user_form.html.erb | |
# But both give 'undefined local variable or method `f' | |
# Partial Rendering Hook. | |
insert_after :signup_below_password_fields, 'form_fields' | |
# Also tried a block rendering hook. | |
insert_after :signup_below_password_fields do | |
"<%= f.label :school %><br />" | |
"<%= f.select School.all %>" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
submitted a patch for 0-11-stable to allow for access to the form builder for the hooks inside of the user form.
http://railsdog.lighthouseapp.com/projects/31096/tickets/1606-011-give-hooks-inside-the-user-form-access-to-the-form-builder-theme_default
http://github.com/mdeering/spree/commit/d9666f1a2bce16c85d2ad1d1902e1aa9acd8c0f3