Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby Advanced Social Features in Ruby on Rails Uploading Files Attaching Files: Part 2

Implementing Paperclip with Rails 4 and Backbone/Handlebars

Hey there I'm trying to implement this Paperclip advice into a Rails 4 app that I'm building with Backbone and Handlebars. I'm using HBS templates for the form, and these templates are in HTML. When you are creating the <%= field_for %>, what should I use as an alternative within this handlebars form?

1 Answer

Naomi Freeman
STAFF
Naomi Freeman
Treehouse Guest Teacher

Why do you say fields_for and not form_for?

I believe the only helper block in handlebars is {{#form "/post" class="form"}} code for form fields in here
{{/form}}

but with backbone and handlebars you'd have to make sure you call that before you do the form. just see the github for that bit https://github.com/badsyntax/handlebars-form-helpers