Skip to content

Instantly share code, notes, and snippets.

@machty
Created January 6, 2014 00:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save machty/8276094 to your computer and use it in GitHub Desktop.
Save machty/8276094 to your computer and use it in GitHub Desktop.
{{#form-for model}}
{{|form|}} isn't this nicer than {{params 'form'}}?
This is one approach to context-specific helpers, no?
{{form.input 'name'}}
Or just provide data
{{/form-for}}
{{#tool-box}}
{{|tools|}}
Context specific helper.
Any value in making this work different than rails does?
{{tools.screwdriver turn-right=true}}
{{/tool-box}}
{{foo}}
{{#x-calendar date=whatever}}
I dunno what goes in here. What is the default
template for a component with many overridable subcomponents?
{{^day-cell}}
{{|day, calendarHelpers|}}
<span>{{day}}</span>
Remember these are all just ruby blocks; scope is
still the outside, so {{foo}} is the same as outside
x-calendar
{{^month}}
{{|month, calendar|}} or maybe just {{|month calendar|}}
Look at this stupid month: {{month.title}}
<div id="my-dumb-month-wrapper">
maybe this exists?
{{super}}
or manual
{{#each day in month.days}}
{{day-cell day=day}}
my hunch is that render helpers would be provided
by the calendar component for proper setup, setting
defaults, collecting any other args to present to the
child component
{{calendar.render-day day}}
Though I guess we're stepping away from web components.
{{/each}}
</div>
{{/x-calendar}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment