Skip to content

Instantly share code, notes, and snippets.

@db0sch
Last active June 5, 2025 11:14
Show Gist options
  • Select an option

  • Save db0sch/57d2d8c8e3f478b183c68e8051fe3a01 to your computer and use it in GitHub Desktop.

Select an option

Save db0sch/57d2d8c8e3f478b183c68e8051fe3a01 to your computer and use it in GitHub Desktop.

Revisions

  1. db0sch revised this gist Jun 28, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion erb_snippets.md
    Original file line number Diff line number Diff line change
    @@ -10,4 +10,4 @@ print ERB tags | __pe__ | `<%= %>`
    `elsif` tag | __elsif__ | `<% elsif %>`
    `unless` block | __unless__ | `<% unless %>...<% end %>`
    `end` block | __end__ | `<% end %>`
    `each` helper | __each__ | ```<% @things.each do |thing| %> ... <% end %>```
    `each` helper | __each__ | `<% @things.each do ...`
  2. db0sch revised this gist Jun 28, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion erb_snippets.md
    Original file line number Diff line number Diff line change
    @@ -10,4 +10,4 @@ print ERB tags | __pe__ | `<%= %>`
    `elsif` tag | __elsif__ | `<% elsif %>`
    `unless` block | __unless__ | `<% unless %>...<% end %>`
    `end` block | __end__ | `<% end %>`
    `each` helper | __each__ | `<% @things.each do |thing| %> ... <% end %>`
    `each` helper | __each__ | ```<% @things.each do |thing| %> ... <% end %>```
  3. db0sch revised this gist Jun 28, 2021. No changes.
  4. db0sch revised this gist Jun 28, 2021. No changes.
  5. db0sch revised this gist Jun 14, 2021. 1 changed file with 1 addition and 10 deletions.
    11 changes: 1 addition & 10 deletions erb_snippets.md
    Original file line number Diff line number Diff line change
    @@ -4,19 +4,10 @@ Snippet | Tab Trigger | Output
    --- | --- | ---
    ERB tags | __er__ | `<% %>`
    print ERB tags | __pe__ | `<%= %>`
    print ERB comment | __pc__ | `<%# %>`
    `if` block | __if__ | `<% if %>...<% end %>`
    `if` / `else` block | __ife__ | `<% if %>...<% else %>...<% end %>`
    `else` tag | __else__ | `<% else %>`
    `elsif` tag | __elsif__ | `<% elsif %>`
    `unless` block | __unless__ | `<% unless %>...<% end %>`
    `end` block | __end__ | `<% end %>`
    `image_tag` helper | __it__ | `<%= image_tag ..., ... %>`
    `submit_tag` helper | __st__ | `<%= submit_tag ..., ... %>`
    `text_field_tag` helper | __tft__ | `<%= text_field_tag ..., ... %>`
    `password_field_tag` helper | __pft__ | `<%= password_field_tag ..., ... %>`
    `label_tag` helper | __lblt__ | `<%= label_tag ..., ... %>`
    `link_to` helper | __lt__ | `<%= link_to ..., ... %>`
    `each` helper | __each__ | `<% @things.each do |thing| %> ... <% end %>`
    `form_for` helper | __ff__ | `<%= form_for(@ ) do |f| %> ... <% end %>`
    `t()` helper | __t__ | `<%= t('@') %>`
    `each` helper | __each__ | `<% @things.each do |thing| %> ... <% end %>`
  6. db0sch revised this gist Jun 14, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion erb_snippets.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # Snippets and Bindings
    # Text Editor ERB Snippets and Bindings

    Snippet | Tab Trigger | Output
    --- | --- | ---
  7. db0sch created this gist Jun 14, 2021.
    22 changes: 22 additions & 0 deletions erb_snippets.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    # Snippets and Bindings

    Snippet | Tab Trigger | Output
    --- | --- | ---
    ERB tags | __er__ | `<% %>`
    print ERB tags | __pe__ | `<%= %>`
    print ERB comment | __pc__ | `<%# %>`
    `if` block | __if__ | `<% if %>...<% end %>`
    `if` / `else` block | __ife__ | `<% if %>...<% else %>...<% end %>`
    `else` tag | __else__ | `<% else %>`
    `elsif` tag | __elsif__ | `<% elsif %>`
    `unless` block | __unless__ | `<% unless %>...<% end %>`
    `end` block | __end__ | `<% end %>`
    `image_tag` helper | __it__ | `<%= image_tag ..., ... %>`
    `submit_tag` helper | __st__ | `<%= submit_tag ..., ... %>`
    `text_field_tag` helper | __tft__ | `<%= text_field_tag ..., ... %>`
    `password_field_tag` helper | __pft__ | `<%= password_field_tag ..., ... %>`
    `label_tag` helper | __lblt__ | `<%= label_tag ..., ... %>`
    `link_to` helper | __lt__ | `<%= link_to ..., ... %>`
    `each` helper | __each__ | `<% @things.each do |thing| %> ... <% end %>`
    `form_for` helper | __ff__ | `<%= form_for(@ ) do |f| %> ... <% end %>`
    `t()` helper | __t__ | `<%= t('@') %>`