alexspeller / emblem-rails

Emblem.js integration with rails asset pipeline
MIT License
34 stars 21 forks source link

Can I put outlets in Rails template #35

Closed arthurtalkgoal closed 9 years ago

arthurtalkgoal commented 9 years ago

Is there any ways to put emblem outlets in my rails erb? (instead of defining in .js.emblem?

e.g.

# /rails_root/app/views/layouts/application.html.erb
<div id="sidebar">
{{outlet sidebar}}  
</div>

allow ember handle the sidebar content.

# javascripts/app/templates/application.js.emblem
= render 'menu' outlet="sidebar"
alexspeller commented 9 years ago

Ember does not work like this. I'm not sure why you have a js.coffee file, emblem works with .emblem files. You should generally not have any content in your rails layout, ember renders your whole app.

In any case, this issue is not related to emblem at all. Emblem is just a shorthand for handlebars. I suggest reading the docs on the ember website to understand the basics of how ember works

arthurtalkgoal commented 9 years ago

oh, that's right, it's application.js.emblem