Custom Helper Using Block


Hi :slight_smile:

What should I do to try to create a contact form that works like this:

<%= contact_form do |f| %>
Employer: <%= f.text_field :employer %>

<% end %>

The problem so far is that I seem to have a tough time calling things
like f.remote_form_for(@contact) in a helper - it just doesn’t

Or you could try to help me in another way? I tried putting a block/
proc in the view to do this, but when I use the fields
show up twice - once where I had originally defined them, and once
where I used the call function. Any ideas?? What I tried was like

<% bloc = do |f| %>
Employer: <%= f.text_field :employer %>

<% end %>
then I created the form like normal and called, but it
showed up in two places. Suggestions? Thanks for any help on either of
these… I really want to make this form more ruby-esque.