oleg dashevskii
unread,Jan 18, 2011, 3:58:38 AM1/18/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Spree
Hi all,
I'm trying to use :signup_inside_form hook in my extension (Spree
0.40.2).
It's introduced like this in spree_auth:
<%= form_for(:user, :url => registration_path(@user)) do |f| %>
<%= hook :signup_inside_form do %>
<%= render 'shared/user_form', :f => f %>
<p><%= submit_tag t("create"), :class => 'button primary' %></
p>
<% end %>
<% end %>
In my replacement I need "f" variable, which corresponds to the form
builder. But if I just use
class UserContactInfoHooks < Spree::ThemeSupport::HookListener
replace :signup_inside_form, :partial => 'shared/registration'
end
...my partial doesn't get "f" as a local. How could one do this?
Sure, there's a way to completely override the form, but I'm
interested if a cleaner solution exists.