Created
March 6, 2016 19:47
-
-
Save markandrewj/b907cc3f4b27caec4e24 to your computer and use it in GitHub Desktop.
Revisions
-
markandrewj created this gist
Mar 6, 2016 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,31 @@ Define an empty method in your Ruby script. def comment end If you are using Rails you can add this to application_helpers.rb: module ApplicationHelper def comment end end Now you can use the new method: <% comment do %> <div class="field"> <%= f.label :title %><br> <%= f.text_field :title %> </div> <% end %> Or even tweak it a little for more readability: <% comment do %> <div class="field"> <%= f.label :title %><br> <%= f.text_field :title %> </div> <% comment end %>