RailsCasts Pro episodes are now free!

Learn more or hide this

Alex Matchneer's Profile

GitHub User: machty

Site: machty.com

Comments by Alex Matchneer


Nice episode!

I probably wouldn't have made the separate view for the submit form. Consider the alternative:

<form {{action addEntry on="submit"}}>
  {{view Ember.TextField valueBinding="newEntryName"}}
  <input type="submit" value="Add">

This way, both clicking the submit button and pressing enter within the text field will fire the addEntry action which gets handled by the controller.


No, not within a .slim template, but you wouldn't really want to do that anyway. Way better to have it in its own .emblem file so you can precompile it and not even have to include emblem.js as something your browser has to load


For those of you daunted by all the multiple files, routing, etc., all just to get a simple app up and running, keep in mind that if you need to put something together for prototyping, or you're having trouble keeping all the different pieces in your brain, here's a simplified JSBin of this Railscast:


And if you're curious how you could use a HAML/Slim-esque templating alternative instead of Handlebars:



For what it's worth, Ember doesn't show its relative strength when putting together toy apps. Would be nice to see a much more complex example and some commentary on how the two frameworks scale differently.


For an indented Ember-compatible alternative to Handlebars templates, you can try Emblem.js