This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ------ FOR A NEW RAILS APPLICATION -------- | |
// From command line | |
rails new webpackerapp --skip-sprockets --webpack | |
// ------ FOR AN EXISTING RAILS APPLICATION -------- | |
// Or add to Gemfile: | |
gem 'webpacker' | |
// From command line | |
bundle install | |
bundle exec rails webpacker:install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<text-node text="Text as a prop" /> | |
<text-node text="<div>Raw HTML</div>" /> | |
<text-node curly-braces text="textInCurlyBraces" /> | |
<text-node> | |
Text within Tag | |
</text-node> | |
<text-node> | |
<text-node text="Nested Text Node" /> | |
</text-node> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% current_month = @date.month %> | |
<ul class="month-selector"> | |
<% @budget.months.each_with_index do |d, i| %> | |
- <li><a class="button<%= " ui-state-focus" if current_month == d.month %>" href="?date=<%= URI.escape(Date.parse("#{d.month}/1/#{d.year}").strftime())%>"><%= d. | |
+ <li><a class="button<%= " ui-state-focus" if current_month == d.month %>" href="?date=<%= "#{d.year}-#{d.month}-01" %>"><%= d.strftime("%b") %><% if i==0 || d. | |
<% end %> | |
</ul> |