├── $LABEL.sublime-snippet ├── %3C%=-Fixtures_identify(%3Asymbol)-%%3E.sublime-snippet ├── .gitignore ├── 180-rails-form_tag.sublime-snippet ├── Create-binary-column.sublime-snippet ├── Create-boolean-column.sublime-snippet ├── Create-controller-class.sublime-snippet ├── Create-date-column.sublime-snippet ├── Create-datetime-column.sublime-snippet ├── Create-decimal-column.sublime-snippet ├── Create-float-column.sublime-snippet ├── Create-functional-test-class.sublime-snippet ├── Create-integer-column.sublime-snippet ├── Create-lock_version-column.sublime-snippet ├── Create-references-column.sublime-snippet ├── Create-string-column.sublime-snippet ├── Create-text-column.sublime-snippet ├── Create-time-column.sublime-snippet ├── Create-timestamp-column.sublime-snippet ├── Create-timestamps-columns.sublime-snippet ├── HTML (Rails).tmLanguage ├── JavaScript (Rails).tmLanguage ├── Migration-Add-Column.sublime-snippet ├── Migration-Add-Index.sublime-snippet ├── Migration-Change-Column.sublime-snippet ├── Migration-Create-Column-(mcc).sublime-snippet ├── Migration-Create-Column-Continue-(mccc).sublime-snippet ├── Migration-Create-Table-(mdct).sublime-snippet ├── Migration-Drop-Table-(mdct).sublime-snippet ├── Migration-Remove-Column.sublime-snippet ├── Migration-Remove-Index.sublime-snippet ├── Migration-Rename-Column.sublime-snippet ├── RAILS_DEFAULT_LOGGER.debug-(rdb).sublime-snippet ├── README.md ├── Ruby Haml Comments.tmPreferences ├── Ruby Haml.tmLanguage ├── Ruby on Rails.tmLanguage ├── SQL (Rails).tmLanguage ├── Table-column(s)-rename.sublime-snippet ├── Template (ERB).tmPreferences ├── Template (Haml).tmPreferences ├── Test-Assert-Redirected-To-(art).sublime-snippet ├── Test-Assert-Response-(are).sublime-snippet ├── accepts_nested_attributes_for.sublime-snippet ├── active-record-class-end.sublime-snippet ├── after_create.sublime-snippet ├── after_destroy.sublime-snippet ├── after_save.sublime-snippet ├── after_update.sublime-snippet ├── after_validation.sublime-snippet ├── after_validation_on_create.sublime-snippet ├── after_validation_on_update.sublime-snippet ├── assert(var-=-assigns(%3Avar)).sublime-snippet ├── assert_difference.sublime-snippet ├── assert_no_difference.sublime-snippet ├── assert_redirected_to-(nested-path).sublime-snippet ├── assert_redirected_to-(nested-path-plural).sublime-snippet ├── assert_redirected_to-(path).sublime-snippet ├── assert_redirected_to-(path-plural).sublime-snippet ├── assert_select.sublime-snippet ├── before_create.sublime-snippet ├── before_destroy.sublime-snippet ├── before_save.sublime-snippet ├── before_update.sublime-snippet ├── before_validation.sublime-snippet ├── before_validation_on_create.sublime-snippet ├── before_validation_on_update.sublime-snippet ├── belongs_to-(bt).sublime-snippet ├── binding_pry.sublime-snippet ├── byebug.sublime-snippet ├── cattr_accessor.sublime-snippet ├── class-end.sublime-snippet ├── crud-actions.sublime-snippet ├── def-create-resource.sublime-snippet ├── def-get-request.sublime-snippet ├── def-post-request.sublime-snippet ├── else.sublime-snippet ├── end.sublime-snippet ├── find(id).sublime-snippet ├── find_params_id_(fp).sublime-snippet ├── for-loop-erb.sublime-snippet ├── form_for-check_box.sublime-snippet ├── form_for-checkbox.sublime-snippet ├── form_for-file_field-2.sublime-snippet ├── form_for-file_field.sublime-snippet ├── form_for-hidden_field-2.sublime-snippet ├── form_for-hidden_field.sublime-snippet ├── form_for-label-2.sublime-snippet ├── form_for-label.sublime-snippet ├── form_for-password_field-2.sublime-snippet ├── form_for-password_field.sublime-snippet ├── form_for-radio_box-2.sublime-snippet ├── form_for-radio_box.sublime-snippet ├── form_for-submit-2.sublime-snippet ├── form_for-submit.sublime-snippet ├── form_for-text_area-2.sublime-snippet ├── form_for-text_area.sublime-snippet ├── form_for-text_field-2.sublime-snippet ├── form_for-text_field.sublime-snippet ├── form_for-with-errors.sublime-snippet ├── form_for.sublime-snippet ├── has_and_belongs_to_many-(habtm).sublime-snippet ├── has_many-(hm).sublime-snippet ├── has_many-(through).sublime-snippet ├── has_many-dependent-=-destroy.sublime-snippet ├── has_one-(ho).sublime-snippet ├── has_one_through-(hot).sublime-snippet ├── image_submit_tag.sublime-snippet ├── initializer-method.sublime-snippet ├── javascript_include_tag-(jit).sublime-snippet ├── lia.sublime-snippet ├── liai.sublime-snippet ├── lic.sublime-snippet ├── lica.sublime-snippet ├── licai.sublime-snippet ├── link_to-(nested-path).sublime-snippet ├── link_to-(nested-path-plural).sublime-snippet ├── link_to-(path).sublime-snippet ├── link_to-(path-plural).sublime-snippet ├── link_to-model.sublime-snippet ├── logger_debug.sublime-snippet ├── logger_error.sublime-snippet ├── logger_fatal.sublime-snippet ├── logger_info.sublime-snippet ├── logger_warn.sublime-snippet ├── map(-%3Asym_proc).sublime-snippet ├── mattr_accessor.sublime-snippet ├── messages.json ├── messages ├── install.html └── install.txt ├── named_scope-lambda.sublime-snippet ├── rails-flash.sublime-snippet ├── rea.sublime-snippet ├── reai.sublime-snippet ├── rec.sublime-snippet ├── reca.sublime-snippet ├── recai.sublime-snippet ├── redirect_to-(nested-path).sublime-snippet ├── redirect_to-(nested-path-plural).sublime-snippet ├── redirect_to-(path).sublime-snippet ├── redirect_to-(path-plural).sublime-snippet ├── render-(action)...-(ra).sublime-snippet ├── render-(action-layout)-(ral).sublime-snippet ├── render-(file)-(rf).sublime-snippet ├── render-(file-use_full_path)-(rfu).sublime-snippet ├── render-(inline)-(ri).sublime-snippet ├── render-(inline-locals)-(ril).sublime-snippet ├── render-(inline-type)-(rit).sublime-snippet ├── render-(layout)-(rl).sublime-snippet ├── render-(nothing)-(rn).sublime-snippet ├── render-(nothing-status)-(rns).sublime-snippet ├── render-(partial)-(rp).sublime-snippet ├── render-(partial-collection)-(rpc).sublime-snippet ├── render-(partial-object)-(rpo).sublime-snippet ├── render-(partial-status)-(rps).sublime-snippet ├── render-(text)-(rt).sublime-snippet ├── render-(text-layout)-(rtl).sublime-snippet ├── render-(text-layout=%3Etrue)-(rtlt).sublime-snippet ├── render-(text-status)-(rts).sublime-snippet ├── render-(update).sublime-snippet ├── respond_to.sublime-snippet ├── returning-do-%7Cvariable%7C-%E2%80%A6-end.sublime-snippet ├── routes_resource_only.sublime-snippet ├── routes_resources.sublime-snippet ├── routes_resources_block.sublime-snippet ├── routes_resources_collection_block.sublime-snippet ├── routes_resources_member_block.sublime-snippet ├── scope.sublime-snippet ├── scope_with_args.sublime-snippet ├── stylesheet_link_tag-(slt).sublime-snippet ├── submit_tag.sublime-snippet ├── t_binary-(tcbi).sublime-snippet ├── t_boolean-(tcb).sublime-snippet ├── t_date-(tcda).sublime-snippet ├── t_datetime-(tcdt).sublime-snippet ├── t_decimal-(tcd).sublime-snippet ├── t_float-(tcf).sublime-snippet ├── t_integer-(tci).sublime-snippet ├── t_lock_version-(tcl).sublime-snippet ├── t_references-(tcr).sublime-snippet ├── t_rename-(tre).sublime-snippet ├── t_string-(tcs).sublime-snippet ├── t_text-(tct).sublime-snippet ├── t_time-(tcti).sublime-snippet ├── t_timestamp-(tcts).sublime-snippet ├── t_timestamps-(tctss).sublime-snippet ├── validates_acceptance_of-if.sublime-snippet ├── validates_acceptance_of.sublime-snippet ├── validates_associated-(va).sublime-snippet ├── validates_associated-if-(vaif).sublime-snippet ├── validates_confirmation_of-(vc).sublime-snippet ├── validates_confirmation_of-if-(vcif).sublime-snippet ├── validates_exclusion_of-(ve).sublime-snippet ├── validates_exclusion_of-if-(veif).sublime-snippet ├── validates_format_of-if.sublime-snippet ├── validates_format_of.sublime-snippet ├── validates_inclusion_of-if.sublime-snippet ├── validates_inclusion_of.sublime-snippet ├── validates_length_of-(vl).sublime-snippet ├── validates_length_of-if.sublime-snippet ├── validates_numericality_of-if.sublime-snippet ├── validates_numericality_of.sublime-snippet ├── validates_presence_of-(vp).sublime-snippet ├── validates_presence_of-if-(vpif)-2.sublime-snippet ├── validates_uniqueness_of-(vu).sublime-snippet ├── validates_uniqueness_of-if-(vuif).sublime-snippet ├── verify-(verify).sublime-snippet ├── wants_format.sublime-snippet ├── xhr-delete.sublime-snippet ├── xhr-get.sublime-snippet ├── xhr-post.sublime-snippet └── xhr-put.sublime-snippet /$LABEL.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | $L 4 | source.yaml 5 | $LABEL 6 | 7 | -------------------------------------------------------------------------------- /%3C%=-Fixtures_identify(%3Asymbol)-%%3E.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | fi 4 | source.yaml 5 | <%= Fixtures.identify(:symbol) %> 6 | 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.cache -------------------------------------------------------------------------------- /180-rails-form_tag.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 5 | ft 6 | text.html.ruby, text.haml 7 | form_tag 8 | 9 | -------------------------------------------------------------------------------- /Create-binary-column.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 4 | tcbi 5 | meta.rails.migration.create_table, meta.rails.migration.change_table 6 | Table column binary 7 | 8 | -------------------------------------------------------------------------------- /Create-boolean-column.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 4 | tcb 5 | meta.rails.migration.create_table, meta.rails.migration.change_table 6 | Table column boolean 7 | 8 | -------------------------------------------------------------------------------- /Create-controller-class.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 5 | con 6 | source.ruby 7 | Create controller class 8 | 9 | -------------------------------------------------------------------------------- /Create-date-column.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 4 | tcda 5 | meta.rails.migration.create_table, meta.rails.migration.change_table 6 | Table column date 7 | 8 | -------------------------------------------------------------------------------- /Create-datetime-column.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 4 | tcdt 5 | meta.rails.migration.create_table, meta.rails.migration.change_table 6 | Table column datetime 7 | 8 | -------------------------------------------------------------------------------- /Create-decimal-column.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 4 | tcd 5 | meta.rails.migration.create_table, meta.rails.migration.change_table 6 | Table column decimal 7 | 8 | -------------------------------------------------------------------------------- /Create-float-column.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 4 | tcf 5 | meta.rails.migration.create_table, meta.rails.migration.change_table 6 | Table column float 7 | 8 | -------------------------------------------------------------------------------- /Create-functional-test-class.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 8 | cla 9 | source.ruby 10 | Create functional test class 11 | 12 | -------------------------------------------------------------------------------- /Create-integer-column.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 4 | tci 5 | meta.rails.migration.create_table, meta.rails.migration.change_table 6 | Table column integer 7 | 8 | -------------------------------------------------------------------------------- /Create-lock_version-column.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 4 | tcl 5 | meta.rails.migration.create_table, meta.rails.migration.change_table 6 | Table column lock_version 7 | 8 | -------------------------------------------------------------------------------- /Create-references-column.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 4 | tcr 5 | meta.rails.migration.create_table, meta.rails.migration.change_table 6 | Table column(s) references 7 | 8 | -------------------------------------------------------------------------------- /Create-string-column.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 4 | tcs 5 | meta.rails.migration.create_table, meta.rails.migration.change_table 6 | Table column string 7 | 8 | -------------------------------------------------------------------------------- /Create-text-column.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 4 | tct 5 | meta.rails.migration.create_table, meta.rails.migration.change_table 6 | Table column text 7 | 8 | -------------------------------------------------------------------------------- /Create-time-column.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 4 | tcti 5 | meta.rails.migration.create_table, meta.rails.migration.change_table 6 | Table column time 7 | 8 | -------------------------------------------------------------------------------- /Create-timestamp-column.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 4 | tcts 5 | meta.rails.migration.create_table, meta.rails.migration.change_table 6 | Table column timestamp 7 | 8 | -------------------------------------------------------------------------------- /Create-timestamps-columns.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 4 | tctss 5 | meta.rails.migration.create_table, meta.rails.migration.change_table 6 | Table column timestamps 7 | 8 | -------------------------------------------------------------------------------- /HTML (Rails).tmLanguage: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | fileTypes 6 | 7 | rhtml 8 | erb 9 | html.erb 10 | 11 | foldingStartMarker 12 | (?x) 13 | (<(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|form|dl)\b.*?> 14 | |<!--(?!.*-->) 15 | |\{\s*($|\?>\s*$|//|/\*(.*\*/\s*$|(?!.*?\*/))) 16 | ) 17 | foldingStopMarker 18 | (?x) 19 | (</(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|form|dl)> 20 | |^\s*--> 21 | |(^|\s)\} 22 | ) 23 | keyEquivalent 24 | ^~R 25 | name 26 | HTML (Rails) 27 | patterns 28 | 29 | 30 | begin 31 | <%+# 32 | captures 33 | 34 | 0 35 | 36 | name 37 | punctuation.definition.comment.erb 38 | 39 | 40 | end 41 | %> 42 | name 43 | comment.block.erb 44 | 45 | 46 | begin 47 | <%+(?!>)[-=]? 48 | captures 49 | 50 | 0 51 | 52 | name 53 | punctuation.section.embedded.ruby 54 | 55 | 56 | end 57 | -?%> 58 | name 59 | source.ruby.rails.embedded.html 60 | patterns 61 | 62 | 63 | captures 64 | 65 | 1 66 | 67 | name 68 | punctuation.definition.comment.ruby 69 | 70 | 71 | match 72 | (#).*?(?=-?%>) 73 | name 74 | comment.line.number-sign.ruby 75 | 76 | 77 | include 78 | source.ruby.rails 79 | 80 | 81 | 82 | 83 | include 84 | text.html.basic 85 | 86 | 87 | scopeName 88 | text.html.ruby 89 | uuid 90 | 45D7E1FC-7D0B-4105-A1A2-3D10BB555A5C 91 | 92 | 93 | -------------------------------------------------------------------------------- /JavaScript (Rails).tmLanguage: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | fileTypes 6 | 7 | js.erb 8 | 9 | foldingStartMarker 10 | /\*\*|\{\s*$ 11 | foldingStopMarker 12 | \*\*/|^\s*\} 13 | keyEquivalent 14 | ^~J 15 | name 16 | JavaScript (Rails) 17 | patterns 18 | 19 | 20 | begin 21 | <%+# 22 | captures 23 | 24 | 0 25 | 26 | name 27 | punctuation.definition.comment.erb 28 | 29 | 30 | end 31 | %> 32 | name 33 | comment.block.erb 34 | 35 | 36 | begin 37 | <%+(?!>)[-=]? 38 | captures 39 | 40 | 0 41 | 42 | name 43 | punctuation.section.embedded.ruby 44 | 45 | 46 | end 47 | -?%> 48 | name 49 | source.ruby.rails.erb 50 | patterns 51 | 52 | 53 | captures 54 | 55 | 1 56 | 57 | name 58 | punctuation.definition.comment.ruby 59 | 60 | 61 | match 62 | (#).*?(?=-?%>) 63 | name 64 | comment.line.number-sign.ruby 65 | 66 | 67 | include 68 | source.ruby.rails 69 | 70 | 71 | 72 | 73 | include 74 | source.js 75 | 76 | 77 | scopeName 78 | source.js.rails 79 | uuid 80 | 4A3E6DA7-67A3-45B1-9EE0-ECFF9C7FA6C0 81 | 82 | 83 | -------------------------------------------------------------------------------- /Migration-Add-Column.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | mcol 4 | meta.rails.migration - meta.rails.migration.create_table - meta.rails.migration.change_table 5 | Add Column 6 | 7 | -------------------------------------------------------------------------------- /Migration-Add-Index.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | mind 4 | meta.rails.migration - meta.rails.migration.create_table - meta.rails.migration.change_table 5 | Add Index 6 | 7 | -------------------------------------------------------------------------------- /Migration-Change-Column.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | mcol 4 | meta.rails.migration - meta.rails.migration.create_table - meta.rails.migration.change_table 5 | Change Column 6 | 7 | -------------------------------------------------------------------------------- /Migration-Create-Column-(mcc).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 4 | mcol 5 | meta.rails.migration.create_table 6 | Create Column in Table 7 | 8 | -------------------------------------------------------------------------------- /Migration-Create-Column-Continue-(mccc).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 4 | mccc 5 | meta.rails.migration.create_table 6 | Create Several Columns in Table 7 | 8 | -------------------------------------------------------------------------------- /Migration-Create-Table-(mdct).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 8 | mtab 9 | meta.rails.migration - meta.rails.migration.create_table - meta.rails.migration.change_table 10 | Create Table 11 | 12 | -------------------------------------------------------------------------------- /Migration-Drop-Table-(mdct).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | mtab 4 | meta.rails.migration - meta.rails.migration.create_table - meta.rails.migration.change_table 5 | Drop Table 6 | 7 | -------------------------------------------------------------------------------- /Migration-Remove-Column.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | mcol 4 | meta.rails.migration - meta.rails.migration.create_table - meta.rails.migration.change_table 5 | Remove Column 6 | 7 | -------------------------------------------------------------------------------- /Migration-Remove-Index.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | mind 4 | meta.rails.migration - meta.rails.migration.create_table - meta.rails.migration.change_table 5 | Remove Index 6 | 7 | -------------------------------------------------------------------------------- /Migration-Rename-Column.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | mcol 4 | meta.rails.migration - meta.rails.migration.create_table - meta.rails.migration.change_table 5 | Rename Column 6 | 7 | -------------------------------------------------------------------------------- /RAILS_DEFAULT_LOGGER.debug-(rdb).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | rdb 4 | source.ruby.rails 5 | RAILS_DEFAULT_LOGGER.debug 6 | 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Sublime Text Rails snippets 2 | 3 | > :warning: I'll be porting these changes to the [official Sublime Text Rails](https://github.com/sublimehq/Packages) snippets. [Here's how you can help](https://github.com/tadast/sublime-rails-snippets/issues/34) 4 | > 5 | > 6 | This repo provides up-to-date Ruby and Rails snippets for Sublime Text: it's designed to be used with Ruby >= 2.0 and Rails >= 3. All the snippets can be found in [this cheatsheet](http://tadast.github.com/sublime-rails-snippets) generated by [Snipcheat](https://github.com/tadast/snipcheat). 7 | 8 | ![class](http://cl.ly/image/023Y2X0P1R2X/class.gif) 9 | 10 | ![ActiveRecord](http://cl.ly/image/0i0B0M3E1I0A/ar.gif) 11 | 12 | ![migrations](http://cl.ly/image/342Y2m423Q3O/migration.gif) 13 | 14 | # Installation 15 | 16 | If you're using Sublime Text 2, please refer to [older installation instructions](https://github.com/tadast/sublime-rails-snippets/blob/8aa22a211e77e5e48df4522f88726baf60090b2b/README.md#installation). 17 | 18 | ## From Package Control 19 | 20 | The easiest way to install the snippets is via package control. 21 | 22 | However this method has a little downside: it adds new snippets but does not remove the old ones. This means that for some snippet triggers e.g. `vp` (validates presence) you'll see a drop-down with two options, not one. 23 | 24 | Look for "Ruby on Rails snippets" in Package Control. [Here's how to install packages](http://wbond.net/sublime_packages/package_control/usage) 25 | 26 | ## From Git 27 | 28 | This method replaces the default outdated snippets, but you have to keep it up to date manually by running `git pull` every now and again. 29 | 30 | To install via git: 31 | 32 | * First, cd into the ST3 Packages directory 33 | 34 | ```bash 35 | ➜ # Mac: 36 | ➜ cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages 37 | ➜ # Linux: 38 | ➜ cd ~/.config/sublime-text-3/Packages/ 39 | ``` 40 | 41 | * Then clone this repo into the folder 42 | 43 | ``` 44 | ➜ ls | grep Rails 45 | ➜ # if there is a `Rails` dir, back it up e.g. archive it and remove the original. 46 | ➜ git clone https://github.com/tadast/sublime-rails-snippets.git Rails 47 | ``` 48 | 49 | It is important to clone it into a folder called Rails. Some Sublime plugins have hard-coded dependencies pointing to that path. See troubleshooting. 50 | 51 | ### Troubleshooting 52 | 53 | #### Syntax highlighting doesn't work 54 | 55 | You might need to tell Sublime text to use the `Ruby on Rails syntax` provided by `Ruby on Rails Snippets`. With an `.rb` file open and focused navigate to `View -> Syntax -> Open all with current extension as... -> Ruby on Rails Snippets -> Ruby on Rails` 56 | 57 | #### Sublime picks Ruby (not Rails) syntax 58 | 59 | You might need to tell Sublime to prefer Rails over Ruby by navigating to 60 | `View -> Syntax -> Open all with current extension as...` and picking `Rails` of Ruby on Rails snippets 61 | 62 | #### Can't find *.tmLanguage 63 | 64 | If Sublime complains it can't find `Ruby on Rails.tmLanguage`, chances are you are using [this hack](https://gist.github.com/925008). 65 | 66 | You'll need to change the path where it looks for that file. Here's the [forked version which works with this plug-in](https://gist.github.com/4161901). 67 | 68 | You may also need to change `Packages/(DetectSyntax|User)/DetectSyntax.sublime-settings` to replace/include this rule 69 | 70 | ```json 71 | { 72 | "name": "Ruby on Rails snippets/Ruby Haml", 73 | "rules": [ 74 | {"file_name": ".*\\.haml$"} 75 | ] 76 | }, 77 | { 78 | "name": "Ruby on Rails snippets/Ruby on Rails", 79 | "rules": [ 80 | {"function": {"name": "is_rails_file"}} 81 | ] 82 | } 83 | ``` 84 | 85 | `Ruby on Rails snippets` is a default installation directory for Package Control. 86 | If you installed in a different directory, change the path accordingly 87 | 88 | 89 | # How to contribute 90 | 91 | 1. Fork it 92 | 2. Create your feature branch for each group of snippet changes that could be merged individually (`git checkout -b my-new-snippet`) 93 | 3. Commit your changes (`git commit -am 'Add some snippet [tab_trigger]'`) 94 | 4. Commit messages should start with a verb in present simple tense and have all affected tab triggers in square brackets e.g. "Add a snippets for partial rendering [rpc, rpo]" 95 | 5. Push to the branch (`git push origin my-new-snippet`) 96 | 6. Create new Pull Request 97 | -------------------------------------------------------------------------------- /Ruby Haml Comments.tmPreferences: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | name 6 | Comments 7 | scope 8 | text.haml 9 | settings 10 | 11 | shellVariables 12 | 13 | 14 | name 15 | TM_COMMENT_START 16 | value 17 | / 18 | 19 | 20 | 21 | uuid 22 | 4C2E088A-2EDB-44DF-9C62-CE0112B4C237 23 | 24 | 25 | -------------------------------------------------------------------------------- /Ruby Haml.tmLanguage: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | fileTypes 6 | 7 | haml 8 | sass 9 | 10 | foldingStartMarker 11 | ^\s*([-%#\:\.\w\=].*)\s$ 12 | foldingStopMarker 13 | ^\s*$ 14 | keyEquivalent 15 | ^~H 16 | name 17 | Ruby Haml 18 | patterns 19 | 20 | 21 | captures 22 | 23 | 1 24 | 25 | name 26 | punctuation.definition.prolog.haml 27 | 28 | 29 | match 30 | ^(!!!)($|\s.*) 31 | name 32 | meta.prolog.haml 33 | 34 | 35 | captures 36 | 37 | 1 38 | 39 | name 40 | punctuation.section.comment.haml 41 | 42 | 43 | match 44 | ^ *(/)\s*\S.*$\n? 45 | name 46 | comment.line.slash.haml 47 | 48 | 49 | begin 50 | ^( *)(/)\s*$ 51 | beginCaptures 52 | 53 | 2 54 | 55 | name 56 | punctuation.section.comment.haml 57 | 58 | 59 | end 60 | ^(?!\1 ) 61 | name 62 | comment.block.haml 63 | patterns 64 | 65 | 66 | include 67 | text.haml 68 | 69 | 70 | 71 | 72 | begin 73 | ^\s*(?:((%)([\w:]+))|(?=\.|#)) 74 | captures 75 | 76 | 1 77 | 78 | name 79 | meta.tag.haml 80 | 81 | 2 82 | 83 | name 84 | punctuation.definition.tag.haml 85 | 86 | 3 87 | 88 | name 89 | entity.name.tag.haml 90 | 91 | 92 | end 93 | $|(?!\.|#|\{|\[|[&!]?=|-|~|/) 94 | patterns 95 | 96 | 97 | match 98 | \.[\w-]+ 99 | name 100 | entity.name.tag.class.haml 101 | 102 | 103 | match 104 | #[\w-]+ 105 | name 106 | entity.name.tag.id.haml 107 | 108 | 109 | begin 110 | \{(?=.*\}|.*\|\s*$) 111 | end 112 | \}|$|^(?!.*\|\s*$) 113 | name 114 | meta.section.attributes.haml 115 | patterns 116 | 117 | 118 | include 119 | source.ruby.rails 120 | 121 | 122 | include 123 | #continuation 124 | 125 | 126 | 127 | 128 | begin 129 | \[(?=.*\]|.*\|\s*$) 130 | end 131 | \]|$|^(?!.*\|\s*$) 132 | name 133 | meta.section.object.haml 134 | patterns 135 | 136 | 137 | include 138 | source.ruby.rails 139 | 140 | 141 | include 142 | #continuation 143 | 144 | 145 | 146 | 147 | include 148 | #rubyline 149 | 150 | 151 | match 152 | / 153 | name 154 | punctuation.terminator.tag.haml 155 | 156 | 157 | 158 | 159 | captures 160 | 161 | 1 162 | 163 | name 164 | meta.escape.haml 165 | 166 | 167 | match 168 | ^\s*(\\.) 169 | 170 | 171 | begin 172 | ^\s*(?=[&!]?=|-|~) 173 | end 174 | $ 175 | patterns 176 | 177 | 178 | include 179 | #rubyline 180 | 181 | 182 | 183 | 184 | repository 185 | 186 | continuation 187 | 188 | captures 189 | 190 | 1 191 | 192 | name 193 | punctuation.separator.continuation.haml 194 | 195 | 196 | match 197 | (\|)\s*\n 198 | 199 | rubyline 200 | 201 | begin 202 | [&!]?=|-|~ 203 | contentName 204 | source.ruby.embedded.haml 205 | end 206 | ((do|\{)( \|[^|]+\|)?)$|$|^(?!.*\|\s*$) 207 | endCaptures 208 | 209 | 1 210 | 211 | name 212 | source.ruby.embedded.html 213 | 214 | 2 215 | 216 | name 217 | keyword.control.ruby.start-block 218 | 219 | 220 | name 221 | meta.line.ruby.haml 222 | patterns 223 | 224 | 225 | comment 226 | Hack to let ruby comments work in this context properly 227 | match 228 | #.*$ 229 | name 230 | comment.line.number-sign.ruby 231 | 232 | 233 | include 234 | source.ruby.rails 235 | 236 | 237 | include 238 | #continuation 239 | 240 | 241 | 242 | 243 | scopeName 244 | text.haml 245 | uuid 246 | 3D727049-DD05-45DF-92A5-D50EA36FD035 247 | 248 | 249 | -------------------------------------------------------------------------------- /Ruby on Rails.tmLanguage: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | fileTypes 6 | 7 | rxml 8 | builder 9 | 10 | foldingStartMarker 11 | (?x)^ 12 | (\s*+ 13 | (module|class|def 14 | |unless|if 15 | |case 16 | |begin 17 | |for|while|until 18 | |( "(\\.|[^"])*+" # eat a double quoted string 19 | | '(\\.|[^'])*+' # eat a single quoted string 20 | | [^#"'] # eat all but comments and strings 21 | )* 22 | ( \s (do|begin|case) 23 | | [-+=&|*/~%^<>~] \s*+ (if|unless) 24 | ) 25 | )\b 26 | (?! [^;]*+ ; .*? \bend\b ) 27 | |( "(\\.|[^"])*+" # eat a double quoted string 28 | | '(\\.|[^'])*+' # eat a single quoted string 29 | | [^#"'] # eat all but comments and strings 30 | )* 31 | ( \{ (?! [^}]*+ \} ) 32 | | \[ (?! [^\]]*+ \] ) 33 | ) 34 | ).*$ 35 | | [#] .*? \(fold\) \s*+ $ # Sune’s special marker 36 | 37 | foldingStopMarker 38 | (?x) 39 | ( (^|;) \s*+ end \s*+ ([#].*)? $ 40 | | ^ \s*+ [}\]] \s*+ ([#].*)? $ 41 | | [#] .*? \(end\) \s*+ $ # Sune’s special marker 42 | ) 43 | keyEquivalent 44 | ^~R 45 | name 46 | Ruby on Rails 47 | patterns 48 | 49 | 50 | begin 51 | (^\s*)(?=class\s+(([.a-zA-Z0-9_:]+ControllerTest(\s*<\s*[.a-zA-Z0-9_:]+)?))) 52 | comment 53 | Uses lookahead to match classes with the ControllerTest suffix; includes 'source.ruby' to avoid infinite recursion 54 | end 55 | ^\1(?=end)\b 56 | name 57 | meta.rails.functional_test 58 | patterns 59 | 60 | 61 | include 62 | source.ruby 63 | 64 | 65 | include 66 | $self 67 | 68 | 69 | 70 | 71 | begin 72 | (^\s*)(?=class\s+(([.a-zA-Z0-9_:]+Controller\b(\s*<\s*[.a-zA-Z0-9_:]+)?)|(<<\s*[.a-zA-Z0-9_:]+)))(?!.+\bend\b) 73 | comment 74 | Uses lookahead to match classes with the Controller suffix; includes 'source.ruby' to avoid infinite recursion 75 | end 76 | ^\1(?=end)\b 77 | name 78 | meta.rails.controller 79 | patterns 80 | 81 | 82 | include 83 | source.ruby 84 | 85 | 86 | include 87 | $self 88 | 89 | 90 | 91 | 92 | begin 93 | (^\s*)(?=module\s+((([A-Z]\w*::)*)[A-Z]\w*)Helper) 94 | comment 95 | Uses lookahead to match modules with the Helper suffix; includes 'source.ruby' to avoid infinite recursion 96 | end 97 | ^\1(?=end)\b 98 | name 99 | meta.rails.helper 100 | patterns 101 | 102 | 103 | include 104 | source.ruby 105 | 106 | 107 | include 108 | $self 109 | 110 | 111 | 112 | 113 | begin 114 | (^\s*)(?=class\s+(([.a-zA-Z0-9_:]+(\s*<\s*ActionMailer::Base)))) 115 | comment 116 | Uses lookahead to match classes that inherit from ActionMailer::Base; includes 'source.ruby' to avoid infinite recursion 117 | end 118 | ^\1(?=end)\b 119 | name 120 | meta.rails.mailer 121 | patterns 122 | 123 | 124 | include 125 | source.ruby 126 | 127 | 128 | include 129 | $self 130 | 131 | 132 | 133 | 134 | begin 135 | (^\s*)(?=class\s+.+ActiveRecord::Base) 136 | comment 137 | Uses lookahead to match classes that (may) inherit from ActiveRecord::Base; includes 'source.ruby' to avoid infinite recursion 138 | end 139 | ^\1(?=end)\b 140 | name 141 | meta.rails.model 142 | patterns 143 | 144 | 145 | include 146 | source.ruby 147 | 148 | 149 | include 150 | $self 151 | 152 | 153 | 154 | 155 | begin 156 | (^\s*)(?=class\s+.+ActiveRecord::Migration) 157 | comment 158 | Uses lookahead to match classes that (may) inherit from ActiveRecord::Migration; includes 'source.ruby' to avoid infinite recursion 159 | end 160 | ^\1(?=end)\b 161 | name 162 | meta.rails.migration 163 | patterns 164 | 165 | 166 | begin 167 | (^\s*)(?=change_table)\b 168 | comment 169 | Uses lookahead to match methods change_table; includes 'source.ruby' to avoid infinite recursion 170 | contentName 171 | meta.rails.migration.change_table 172 | end 173 | ^\1(?=end)\b 174 | patterns 175 | 176 | 177 | include 178 | source.ruby 179 | 180 | 181 | include 182 | $self 183 | 184 | 185 | 186 | 187 | begin 188 | (^\s*)(?=create_table)\b 189 | comment 190 | Uses lookahead to match methods create_table; includes 'source.ruby' to avoid infinite recursion 191 | contentName 192 | meta.rails.migration.create_table 193 | end 194 | ^\1(?=end)\b 195 | patterns 196 | 197 | 198 | include 199 | source.ruby 200 | 201 | 202 | include 203 | $self 204 | 205 | 206 | 207 | 208 | include 209 | source.ruby 210 | 211 | 212 | include 213 | $self 214 | 215 | 216 | 217 | 218 | begin 219 | (^\s*)(?=class\s+(?![.a-zA-Z0-9_:]+ControllerTest)(([.a-zA-Z0-9_:]+Test(\s*<\s*[.a-zA-Z0-9_:]+)?)|(<<\s*[.a-zA-Z0-9_:]+))) 220 | comment 221 | Uses lookahead to match classes with the Test suffix; includes 'source.ruby' to avoid infinite recursion 222 | end 223 | ^\1(?=end)\b 224 | name 225 | meta.rails.unit_test 226 | patterns 227 | 228 | 229 | include 230 | source.ruby 231 | 232 | 233 | include 234 | $self 235 | 236 | 237 | 238 | 239 | begin 240 | ::Application.routes.draw 241 | comment 242 | Uses ActionController::Routing::Routes to determine it is a routes file; includes 'source.ruby' to avoid infinite recursion 243 | end 244 | ^\1(?=end)\b 245 | name 246 | meta.rails.routes 247 | patterns 248 | 249 | 250 | include 251 | source.ruby 252 | 253 | 254 | include 255 | $self 256 | 257 | 258 | 259 | 260 | match 261 | \b(before_filter|skip_before_filter|skip_after_filter|after_filter|around_filter|before_action|skip_before_action|skip_after_action|after_action|around_action|filter|filter_parameter_logging|layout|require_dependency|render|render_action|render_text|render_file|render_template|render_nothing|render_component|render_without_layout|rescue_from|url_for|redirect_to|redirect_to_path|redirect_to_url|respond_to|helper|helper_method|model|service|observer|serialize|scaffold|verify|hide_action)\b 262 | name 263 | support.function.actionpack.rails 264 | 265 | 266 | match 267 | \b(check_box|content_for|error_messages_for|form_for|fields_for|file_field|hidden_field|image_submit_tag|label|link_to|password_field|radio_button|submit|text_field|text_area)\b 268 | name 269 | support.function.viewhelpers.rails 270 | 271 | 272 | match 273 | \b(named_scope|after_create|after_destroy|after_save|after_update|after_validation|before_create|before_destroy|before_save|before_update|before_validation|composed_of|belongs_to|has_one|has_many|has_and_belongs_to_many|validate|validate_on_create|validates_numericality_of|validate_on_update|validates_acceptance_of|validates_associated|validates_confirmation_of|validates_each|validates_format_of|validates_inclusion_of|validates_exclusion_of|validates_length_of|validates_presence_of|validates_size_of|validates_uniqueness_of|attr_protected|attr_accessible|attr_readonly)\b 274 | name 275 | support.function.activerecord.rails 276 | 277 | 278 | match 279 | \b(alias_method_chain|alias_attribute|delegate|cattr_accessor|mattr_accessor|returning)\b 280 | name 281 | support.function.activesupport.rails 282 | 283 | 284 | include 285 | source.ruby 286 | 287 | 288 | scopeName 289 | source.ruby.rails 290 | uuid 291 | 54D6E91E-8F31-11D9-90C5-0011242E4184 292 | 293 | 294 | -------------------------------------------------------------------------------- /SQL (Rails).tmLanguage: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | fileTypes 6 | 7 | erbsql 8 | sql.erb 9 | 10 | foldingStartMarker 11 | \s*\(\s*$ 12 | foldingStopMarker 13 | ^\s*\) 14 | keyEquivalent 15 | ^~R 16 | name 17 | SQL (Rails) 18 | patterns 19 | 20 | 21 | begin 22 | <%+(?!>)=? 23 | end 24 | %> 25 | name 26 | source.ruby.rails.embedded.sql 27 | patterns 28 | 29 | 30 | match 31 | #.*?(?=%>) 32 | name 33 | comment.line.number-sign.ruby 34 | 35 | 36 | include 37 | source.ruby.rails 38 | 39 | 40 | 41 | 42 | include 43 | source.sql 44 | 45 | 46 | scopeName 47 | source.sql.ruby 48 | uuid 49 | D54FBDED-5481-4CC7-B75F-66465A499882 50 | 51 | 52 | -------------------------------------------------------------------------------- /Table-column(s)-rename.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 4 | tre 5 | meta.rails.migration.create_table, meta.rails.migration.change_table 6 | Table column(s) rename 7 | 8 | -------------------------------------------------------------------------------- /Template (ERB).tmPreferences: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | name 6 | Template (ERB) 7 | scope 8 | text.html.ruby 9 | settings 10 | 11 | shellVariables 12 | 13 | 14 | name 15 | TM_RAILS_TEMPLATE_START_RUBY_EXPR 16 | value 17 | <%= 18 | 19 | 20 | name 21 | TM_RAILS_TEMPLATE_END_RUBY_EXPR 22 | value 23 | %> 24 | 25 | 26 | name 27 | TM_RAILS_TEMPLATE_START_RUBY_INLINE 28 | value 29 | <% 30 | 31 | 32 | name 33 | TM_RAILS_TEMPLATE_END_RUBY_INLINE 34 | value 35 | -%> 36 | 37 | 38 | name 39 | TM_RAILS_TEMPLATE_END_RUBY_BLOCK 40 | value 41 | <% end %> 42 | 43 | 44 | 45 | uuid 46 | 87EF33FE-E918-11DC-A399-00112475D960 47 | 48 | 49 | -------------------------------------------------------------------------------- /Template (Haml).tmPreferences: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | name 6 | Template (Haml) 7 | scope 8 | text.haml 9 | settings 10 | 11 | shellVariables 12 | 13 | 14 | name 15 | TM_RAILS_TEMPLATE_START_RUBY_EXPR 16 | value 17 | = 18 | 19 | 20 | name 21 | TM_RAILS_TEMPLATE_END_RUBY_EXPR 22 | value 23 | 24 | 25 | 26 | name 27 | TM_RAILS_TEMPLATE_START_RUBY_INLINE 28 | value 29 | = 30 | 31 | 32 | name 33 | TM_RAILS_TEMPLATE_END_RUBY_INLINE 34 | value 35 | 36 | 37 | 38 | name 39 | TM_RAILS_TEMPLATE_END_RUBY_BLOCK 40 | value 41 | 42 | 43 | 44 | 45 | uuid 46 | C0FD2646-E924-11DC-A399-00112475D960 47 | 48 | 49 | -------------------------------------------------------------------------------- /Test-Assert-Redirected-To-(art).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | art 4 | source.ruby.rails 5 | assert_redirected_to 6 | 7 | -------------------------------------------------------------------------------- /Test-Assert-Response-(are).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | asre 4 | source.ruby.rails 5 | assert_response 6 | 7 | -------------------------------------------------------------------------------- /accepts_nested_attributes_for.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | (attributes){ attributes['name'].blank? \}}${3:, allow_destroy: true}]]> 3 | anaf 4 | source.ruby.rails 5 | accepts_nested_attributes_for 6 | 7 | -------------------------------------------------------------------------------- /active-record-class-end.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 5 | arc 6 | source.ruby.rails 7 | Active Record model 8 | 9 | -------------------------------------------------------------------------------- /after_create.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | aftc 4 | source.ruby.rails 5 | after_create 6 | 7 | -------------------------------------------------------------------------------- /after_destroy.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | aftd 4 | source.ruby.rails 5 | after_destroy 6 | 7 | -------------------------------------------------------------------------------- /after_save.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | afts 4 | source.ruby.rails 5 | after_save 6 | 7 | -------------------------------------------------------------------------------- /after_update.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | aftu 4 | source.ruby.rails 5 | after_update 6 | 7 | -------------------------------------------------------------------------------- /after_validation.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | aftv 4 | source.ruby.rails 5 | after_validation 6 | 7 | -------------------------------------------------------------------------------- /after_validation_on_create.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | aftvoc 4 | source.ruby.rails 5 | after_validation on create 6 | 7 | -------------------------------------------------------------------------------- /after_validation_on_update.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | aftvou 4 | source.ruby.rails 5 | after_validation on update 6 | 7 | -------------------------------------------------------------------------------- /assert(var-=-assigns(%3Avar)).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 4 | asg 5 | source.ruby 6 | assert(var = assigns(:var)) 7 | 8 | -------------------------------------------------------------------------------- /assert_difference.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 5 | asd 6 | source.ruby 7 | assert_difference 8 | 9 | -------------------------------------------------------------------------------- /assert_no_difference.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 5 | asnd 6 | source.ruby 7 | assert_no_difference 8 | 9 | -------------------------------------------------------------------------------- /assert_redirected_to-(nested-path).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | artnp 4 | source.ruby.rails 5 | assert_redirected_to (nested path) 6 | 7 | -------------------------------------------------------------------------------- /assert_redirected_to-(nested-path-plural).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | artnpp 4 | source.ruby.rails 5 | assert_redirected_to (nested path plural) 6 | 7 | -------------------------------------------------------------------------------- /assert_redirected_to-(path).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | artp 4 | source.ruby.rails 5 | assert_redirected_to (path) 6 | 7 | -------------------------------------------------------------------------------- /assert_redirected_to-(path-plural).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | artpp 4 | source.ruby.rails 5 | assert_redirected_to (path plural) 6 | 7 | -------------------------------------------------------------------------------- /assert_select.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 5 | ass 6 | source.ruby.rails 7 | assert_select 8 | 9 | -------------------------------------------------------------------------------- /before_create.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | befc 4 | source.ruby.rails 5 | before_create 6 | 7 | -------------------------------------------------------------------------------- /before_destroy.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | befd 4 | source.ruby.rails 5 | before_destroy 6 | 7 | -------------------------------------------------------------------------------- /before_save.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | befs 4 | source.ruby.rails 5 | before_save 6 | 7 | -------------------------------------------------------------------------------- /before_update.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | befu 4 | source.ruby.rails 5 | before_update 6 | 7 | -------------------------------------------------------------------------------- /before_validation.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | befv 4 | source.ruby.rails 5 | before_validation 6 | 7 | -------------------------------------------------------------------------------- /before_validation_on_create.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | befvoc 4 | source.ruby.rails 5 | before_validation on create 6 | 7 | -------------------------------------------------------------------------------- /before_validation_on_update.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | befvou 4 | source.ruby.rails 5 | before_validation on update 6 | 7 | -------------------------------------------------------------------------------- /belongs_to-(bt).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | bt 4 | source.ruby.rails 5 | belongs_to 6 | 7 | -------------------------------------------------------------------------------- /binding_pry.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 5 | bp 6 | source.ruby 7 | 8 | -------------------------------------------------------------------------------- /byebug.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 5 | bb 6 | source.ruby 7 | -------------------------------------------------------------------------------- /cattr_accessor.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | crw 4 | source.ruby.rails 5 | cattr_accessor 6 | 7 | -------------------------------------------------------------------------------- /class-end.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 5 | class 6 | source.ruby 7 | class NAME end 8 | 9 | -------------------------------------------------------------------------------- /crud-actions.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 26 | crud 27 | meta.rails.controller 28 | crud actions 29 | 30 | -------------------------------------------------------------------------------- /def-create-resource.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 17 | defcreate 18 | meta.rails.controller 19 | def create - resource 20 | 21 | -------------------------------------------------------------------------------- /def-get-request.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 8 | deftg 9 | meta.rails.functional_test 10 | def test_should_get_action 11 | 12 | -------------------------------------------------------------------------------- /def-post-request.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 8 | deftp 9 | meta.rails.functional_test 10 | def test_should_post_action 11 | 12 | -------------------------------------------------------------------------------- /else.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | ]]> 3 | els 4 | text.html.ruby 5 | else (ERB) 6 | 7 | -------------------------------------------------------------------------------- /end.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | ]]> 3 | end 4 | text.html.ruby 5 | end (ERB) 6 | 7 | -------------------------------------------------------------------------------- /find(id).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | fini 4 | source.ruby.rails 5 | find(id) 6 | 7 | -------------------------------------------------------------------------------- /find_params_id_(fp).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | fp 4 | meta.rails.controller 5 | find(params[:id]) 6 | 7 | -------------------------------------------------------------------------------- /for-loop-erb.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | <% for ${2:item} in ${1} %> 4 | $3 5 | <% end %> 6 | <% else %> 7 | $4 8 | <% end %> 9 | ]]> 10 | for 11 | text.html.ruby 12 | for loop in rhtml 13 | 14 | -------------------------------------------------------------------------------- /form_for-check_box.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | ffcb 4 | text.html.ruby, text.haml 5 | form_for check_box 6 | 7 | -------------------------------------------------------------------------------- /form_for-checkbox.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | f. 4 | text.html.ruby, text.haml 5 | f.check_box (ffcb) 6 | 7 | -------------------------------------------------------------------------------- /form_for-file_field-2.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | ffff 4 | text.html.ruby, text.haml 5 | form_for file_field 6 | 7 | -------------------------------------------------------------------------------- /form_for-file_field.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | f. 4 | text.html.ruby, text.haml 5 | f.file_field (ffff) 6 | 7 | -------------------------------------------------------------------------------- /form_for-hidden_field-2.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | ffhf 4 | text.html.ruby, text.haml 5 | form_for hidden_field 6 | 7 | -------------------------------------------------------------------------------- /form_for-hidden_field.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | f. 4 | text.html.ruby, text.haml 5 | f.hidden_field (ffhf) 6 | 7 | -------------------------------------------------------------------------------- /form_for-label-2.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | ffl 4 | text.html.ruby, text.haml 5 | form_for label 6 | 7 | -------------------------------------------------------------------------------- /form_for-label.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | f. 4 | text.html.ruby, text.haml 5 | f.label (ffl) 6 | 7 | -------------------------------------------------------------------------------- /form_for-password_field-2.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | ffpf 4 | text.html.ruby, text.haml 5 | form_for password_field 6 | 7 | -------------------------------------------------------------------------------- /form_for-password_field.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | f. 4 | text.html.ruby, text.haml 5 | f.password_field (ffpf) 6 | 7 | -------------------------------------------------------------------------------- /form_for-radio_box-2.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | ffrb 4 | text.html.ruby, text.haml 5 | form_for radio_box 6 | 7 | -------------------------------------------------------------------------------- /form_for-radio_box.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | f. 4 | text.html.ruby, text.haml 5 | f.radio_box (ffrb) 6 | 7 | -------------------------------------------------------------------------------- /form_for-submit-2.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | ffs 4 | text.html.ruby, text.haml 5 | form_for submit 6 | 7 | -------------------------------------------------------------------------------- /form_for-submit.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | f. 4 | text.html.ruby, text.haml 5 | f.submit (ffs) 6 | 7 | -------------------------------------------------------------------------------- /form_for-text_area-2.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | ffta 4 | text.html.ruby, text.haml 5 | form_for text_area 6 | 7 | -------------------------------------------------------------------------------- /form_for-text_area.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | f. 4 | text.html.ruby, text.haml 5 | f.text_area (ffta) 6 | 7 | -------------------------------------------------------------------------------- /form_for-text_field-2.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | fftf 4 | text.html.ruby, text.haml 5 | form_for text_field 6 | 7 | -------------------------------------------------------------------------------- /form_for-text_field.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | f. 4 | text.html.ruby, text.haml 5 | f.text_field (fftf) 6 | 7 | -------------------------------------------------------------------------------- /form_for-with-errors.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 7 | ffe 8 | text.html.ruby, text.haml 9 | form_for with errors 10 | 11 | -------------------------------------------------------------------------------- /form_for.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 5 | ff 6 | text.html.ruby, text.haml 7 | form_for 8 | 9 | -------------------------------------------------------------------------------- /has_and_belongs_to_many-(habtm).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | habtm 4 | source.ruby.rails 5 | has_and_belongs_to_many 6 | 7 | -------------------------------------------------------------------------------- /has_many-(hm).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | hm 4 | source.ruby.rails 5 | has_many 6 | 7 | -------------------------------------------------------------------------------- /has_many-(through).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | hmt 4 | source.ruby.rails 5 | has_many (through) 6 | 7 | -------------------------------------------------------------------------------- /has_many-dependent-=-destroy.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | hmd 4 | source.ruby.rails 5 | has_many dependent: :destroy 6 | 7 | -------------------------------------------------------------------------------- /has_one-(ho).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | ho 4 | source.ruby.rails 5 | has_one 6 | 7 | -------------------------------------------------------------------------------- /has_one_through-(hot).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | hot 4 | source.ruby.rails 5 | has_one through 6 | 7 | -------------------------------------------------------------------------------- /image_submit_tag.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | ist 4 | text.html.ruby, text.haml 5 | image_submit_tag 6 | 7 | -------------------------------------------------------------------------------- /initializer-method.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 5 | defi 6 | source.ruby 7 | Define initializer method 8 | 9 | -------------------------------------------------------------------------------- /javascript_include_tag-(jit).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | jit 4 | text.html.ruby, text.haml 5 | javascript_include_tag 6 | -------------------------------------------------------------------------------- /lia.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | lia 4 | text.html.ruby, text.haml 5 | link_to (action) 6 | 7 | -------------------------------------------------------------------------------- /liai.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | liai 4 | text.html.ruby, text.haml 5 | link_to (action, id) 6 | 7 | -------------------------------------------------------------------------------- /lic.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | lic 4 | text.html.ruby, text.haml 5 | link_to (controller) 6 | 7 | -------------------------------------------------------------------------------- /lica.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | lica 4 | text.html.ruby, text.haml 5 | link_to (controller, action) 6 | 7 | -------------------------------------------------------------------------------- /licai.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | licai 4 | text.html.ruby, text.haml 5 | link_to (controller, action, id) 6 | 7 | -------------------------------------------------------------------------------- /link_to-(nested-path).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | linp 4 | text.html.ruby, text.haml 5 | link_to (nested path) 6 | 7 | -------------------------------------------------------------------------------- /link_to-(nested-path-plural).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | linpp 4 | text.html.ruby, text.haml 5 | link_to (nested path plural) 6 | 7 | -------------------------------------------------------------------------------- /link_to-(path).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | lip 4 | text.html.ruby, text.haml 5 | link_to (path) 6 | 7 | -------------------------------------------------------------------------------- /link_to-(path-plural).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | lipp 4 | text.html.ruby, text.haml 5 | link_to (path plural) 6 | 7 | -------------------------------------------------------------------------------- /link_to-model.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | lim 4 | text.html.ruby, text.haml 5 | link_to model 6 | 7 | -------------------------------------------------------------------------------- /logger_debug.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | logd 4 | source.ruby.rails 5 | logger.debug 6 | 7 | -------------------------------------------------------------------------------- /logger_error.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | loge 4 | source.ruby.rails 5 | logger.error 6 | 7 | -------------------------------------------------------------------------------- /logger_fatal.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | logf 4 | source.ruby.rails 5 | logger.fatal 6 | 7 | -------------------------------------------------------------------------------- /logger_info.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | logi 4 | source.ruby.rails 5 | logger.info 6 | 7 | -------------------------------------------------------------------------------- /logger_warn.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | logw 4 | source.ruby.rails 5 | logger.warn 6 | 7 | -------------------------------------------------------------------------------- /map(-%3Asym_proc).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | mp 4 | source.ruby.rails 5 | map(&:sym_proc) 6 | 7 | -------------------------------------------------------------------------------- /mattr_accessor.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | mrw 4 | source.ruby.rails 5 | mattr_accessor 6 | 7 | -------------------------------------------------------------------------------- /messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "install": "messages/install.txt" 3 | } -------------------------------------------------------------------------------- /messages/install.html: -------------------------------------------------------------------------------- 1 | install

Thanks for installing Ruby on Rails Snippets

1018 |

Package Controll installs the new snippets alongside the default, outdated ones provided by Sublime Text. If you’d like to completely replace the old snippets, follow installation via git instructions in the readme:

1019 |

https://github.com/tadast/sublime-rails-snippets/blob/master/README.md

1020 |

Future of this Package

-------------------------------------------------------------------------------- /messages/install.txt: -------------------------------------------------------------------------------- 1 | Thanks for installing Ruby on Rails Snippets 2 | 3 | Package Controll installs the new snippets alongside the default, outdated ones provided by Sublime Text. If you'd like to completely replace the old snippets, follow installation via git instructions in the readme: 4 | 5 | https://github.com/tadast/sublime-rails-snippets/blob/master/README.md 6 | 7 | ========================= 8 | FUTURE OF THIS PACKAGE 9 | ========================= 10 | 11 | I'll be porting the changes in this package to the official Sublime Text Rails snippets. 12 | 13 | If you want to make Sublime awesome for Rails again, join the effort: 14 | https://github.com/tadast/sublime-rails-snippets/issues/34 15 | -------------------------------------------------------------------------------- /named_scope-lambda.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | (${1:param}){ ${3:['${4:${5:field} = ?}', ${6:$1}]} } 3 | ]]> 4 | lsc 5 | source.ruby.rails 6 | lambda 7 | 8 | -------------------------------------------------------------------------------- /rails-flash.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | flash 4 | source.ruby.rails 5 | flash[…] 6 | 7 | -------------------------------------------------------------------------------- /rea.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | rea 4 | source.ruby.rails 5 | redirect_to (action) 6 | 7 | -------------------------------------------------------------------------------- /reai.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | reai 4 | source.ruby.rails 5 | redirect_to (action, id) 6 | 7 | -------------------------------------------------------------------------------- /rec.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | rec 4 | source.ruby.rails 5 | redirect_to (controller) 6 | 7 | -------------------------------------------------------------------------------- /reca.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | reca 4 | source.ruby.rails 5 | redirect_to (controller, action) 6 | 7 | -------------------------------------------------------------------------------- /recai.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | recai 4 | source.ruby.rails 5 | redirect_to (controller, action, id) 6 | 7 | -------------------------------------------------------------------------------- /redirect_to-(nested-path).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | renp 4 | source.ruby.rails 5 | redirect_to (nested path) 6 | 7 | -------------------------------------------------------------------------------- /redirect_to-(nested-path-plural).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | renpp 4 | source.ruby.rails 5 | redirect_to (nested path plural) 6 | 7 | -------------------------------------------------------------------------------- /redirect_to-(path).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | rep 4 | source.ruby.rails 5 | redirect_to (path) 6 | 7 | -------------------------------------------------------------------------------- /redirect_to-(path-plural).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | repp 4 | source.ruby.rails 5 | redirect_to (path plural) 6 | 7 | -------------------------------------------------------------------------------- /render-(action)...-(ra).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | ra 4 | source.ruby.rails 5 | render (action) 6 | 7 | -------------------------------------------------------------------------------- /render-(action-layout)-(ral).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | ral 4 | source.ruby.rails 5 | render (action, layout) 6 | 7 | -------------------------------------------------------------------------------- /render-(file)-(rf).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | rf 4 | source.ruby.rails 5 | render (file) 6 | 7 | -------------------------------------------------------------------------------- /render-(file-use_full_path)-(rfu).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | rfu 4 | source.ruby.rails 5 | render (file, use_full_path) 6 | 7 | -------------------------------------------------------------------------------- /render-(inline)-(ri).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | }"]]> 3 | ri 4 | source.ruby.rails 5 | render (inline) 6 | 7 | -------------------------------------------------------------------------------- /render-(inline-locals)-(ril).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | }", locals: { ${2:name}: "${3:value}"$4 }]]> 3 | ril 4 | source.ruby.rails 5 | render (inline, locals) 6 | 7 | -------------------------------------------------------------------------------- /render-(inline-type)-(rit).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | }", type: ${2::rxml}]]> 3 | rit 4 | source.ruby.rails 5 | render (inline, type) 6 | 7 | -------------------------------------------------------------------------------- /render-(layout)-(rl).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | rl 4 | source.ruby.rails 5 | render (layout) 6 | 7 | -------------------------------------------------------------------------------- /render-(nothing)-(rn).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | rn 4 | source.ruby.rails 5 | render (nothing) 6 | -------------------------------------------------------------------------------- /render-(nothing-status)-(rns).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | rns 4 | source.ruby.rails 5 | render (nothing, status) 6 | 7 | -------------------------------------------------------------------------------- /render-(partial)-(rp).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | rp 4 | source.ruby.rails, text.haml 5 | render partial 6 | 7 | -------------------------------------------------------------------------------- /render-(partial-collection)-(rpc).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | rpc 4 | source.ruby.rails, text.haml 5 | render (partial, collection) 6 | 7 | -------------------------------------------------------------------------------- /render-(partial-object)-(rpo).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | rpo 4 | source.ruby.rails, text.haml 5 | render (partial, object) 6 | 7 | -------------------------------------------------------------------------------- /render-(partial-status)-(rps).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | rps 4 | source.ruby.rails 5 | render (partial, status) 6 | 7 | -------------------------------------------------------------------------------- /render-(text)-(rt).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | rt 4 | source.ruby.rails 5 | render (text) 6 | 7 | -------------------------------------------------------------------------------- /render-(text-layout)-(rtl).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | rtl 4 | source.ruby.rails 5 | render (text, layout) 6 | 7 | -------------------------------------------------------------------------------- /render-(text-layout=%3Etrue)-(rtlt).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | rtlt 4 | source.ruby.rails 5 | render (text, layout: true) 6 | 7 | -------------------------------------------------------------------------------- /render-(text-status)-(rts).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | rts 4 | source.ruby.rails 5 | render (text, status) 6 | 7 | -------------------------------------------------------------------------------- /render-(update).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 5 | ru 6 | source.ruby.rails 7 | render (update) 8 | 9 | -------------------------------------------------------------------------------- /respond_to.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 5 | rest 6 | meta.rails.controller 7 | respond_to 8 | 9 | -------------------------------------------------------------------------------- /returning-do-%7Cvariable%7C-%E2%80%A6-end.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | \s*[a-z_][a-zA-Z0-9_]*\s*)(,\g)*,?\s*$)|.*/(?1: |)/}${2:v}${2/(^(?\s*[a-z_][a-zA-Z0-9_]*\s*)(,\g)*,?\s*$)|.*/(?1:|)/} 3 | $0 4 | end]]> 5 | returning 6 | source.ruby.rails 7 | returning do |variable| … end 8 | 9 | -------------------------------------------------------------------------------- /routes_resource_only.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | reso 4 | meta.rails.routes 5 | resources :name, only: [:actions] 6 | 7 | -------------------------------------------------------------------------------- /routes_resources.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | res 4 | meta.rails.routes 5 | resources :resource_name 6 | 7 | -------------------------------------------------------------------------------- /routes_resources_block.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 5 | resd 6 | meta.rails.routes 7 | resources with an empty params block 8 | 9 | -------------------------------------------------------------------------------- /routes_resources_collection_block.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 7 | resdc 8 | meta.rails.routes 9 | resources with a custom collection block 10 | 11 | -------------------------------------------------------------------------------- /routes_resources_member_block.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 7 | resdm 8 | meta.rails.routes 9 | resources with a custom member block 10 | 11 | -------------------------------------------------------------------------------- /scope.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | { where(${2:attr:} ${3:value}) } 3 | ]]> 4 | sc 5 | source.ruby.rails 6 | scope 7 | 8 | -------------------------------------------------------------------------------- /scope_with_args.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | (${2:arg}){ where(${3:attribute:} ${2}) } 3 | ]]> 4 | scar 5 | source.ruby.rails 6 | scope with arguments 7 | 8 | -------------------------------------------------------------------------------- /stylesheet_link_tag-(slt).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | slt 4 | text.html.ruby, text.haml 5 | stylesheet_link_tag 6 | -------------------------------------------------------------------------------- /submit_tag.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | st 4 | text.html.ruby, text.haml 5 | submit_tag 6 | 7 | -------------------------------------------------------------------------------- /t_binary-(tcbi).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 4 | t. 5 | meta.rails.migration.create_table, meta.rails.migration.change_table 6 | t.binary (tcbi) 7 | 8 | -------------------------------------------------------------------------------- /t_boolean-(tcb).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 4 | t. 5 | meta.rails.migration.create_table, meta.rails.migration.change_table 6 | t.boolean (tcb) 7 | 8 | -------------------------------------------------------------------------------- /t_date-(tcda).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 4 | t. 5 | meta.rails.migration.create_table, meta.rails.migration.change_table 6 | t.date (tcda) 7 | 8 | -------------------------------------------------------------------------------- /t_datetime-(tcdt).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 4 | t. 5 | meta.rails.migration.create_table, meta.rails.migration.change_table 6 | t.datetime (tcdt) 7 | 8 | -------------------------------------------------------------------------------- /t_decimal-(tcd).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 4 | t. 5 | meta.rails.migration.create_table, meta.rails.migration.change_table 6 | t.decimal (tcd) 7 | 8 | -------------------------------------------------------------------------------- /t_float-(tcf).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 4 | t. 5 | meta.rails.migration.create_table, meta.rails.migration.change_table 6 | t.float (tcf) 7 | 8 | -------------------------------------------------------------------------------- /t_integer-(tci).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 4 | t. 5 | meta.rails.migration.create_table, meta.rails.migration.change_table 6 | t.integer (tci) 7 | 8 | -------------------------------------------------------------------------------- /t_lock_version-(tcl).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 4 | t. 5 | meta.rails.migration.create_table, meta.rails.migration.change_table 6 | t.lock_version (tcl) 7 | 8 | -------------------------------------------------------------------------------- /t_references-(tcr).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 4 | t. 5 | meta.rails.migration.create_table, meta.rails.migration.change_table 6 | t.references (tcr) 7 | 8 | -------------------------------------------------------------------------------- /t_rename-(tre).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 4 | t. 5 | meta.rails.migration.create_table, meta.rails.migration.change_table 6 | t.rename (tre) 7 | 8 | -------------------------------------------------------------------------------- /t_string-(tcs).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 4 | t. 5 | meta.rails.migration.create_table, meta.rails.migration.change_table 6 | t.string (tcs) 7 | 8 | -------------------------------------------------------------------------------- /t_text-(tct).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 4 | t. 5 | meta.rails.migration.create_table, meta.rails.migration.change_table 6 | t.text (tct) 7 | 8 | -------------------------------------------------------------------------------- /t_time-(tcti).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 4 | t. 5 | meta.rails.migration.create_table, meta.rails.migration.change_table 6 | t.time (tcti) 7 | 8 | -------------------------------------------------------------------------------- /t_timestamp-(tcts).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 4 | t. 5 | meta.rails.migration.create_table, meta.rails.migration.change_table 6 | t.timestamp (tcts) 7 | 8 | -------------------------------------------------------------------------------- /t_timestamps-(tctss).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 4 | t. 5 | meta.rails.migration.create_table, meta.rails.migration.change_table 6 | t.timestamps (tctss) 7 | 8 | -------------------------------------------------------------------------------- /validates_acceptance_of-if.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | vaoif 4 | source.ruby.rails 5 | validates_acceptance_of if 6 | 7 | -------------------------------------------------------------------------------- /validates_acceptance_of.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | vao 4 | source.ruby.rails 5 | validates_acceptance_of 6 | 7 | -------------------------------------------------------------------------------- /validates_associated-(va).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | va 4 | source.ruby.rails 5 | validates_associated 6 | 7 | -------------------------------------------------------------------------------- /validates_associated-if-(vaif).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | vaif 4 | source.ruby.rails 5 | validates_associated if 6 | 7 | -------------------------------------------------------------------------------- /validates_confirmation_of-(vc).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | vc 4 | source.ruby.rails 5 | validates_confirmation_of 6 | 7 | -------------------------------------------------------------------------------- /validates_confirmation_of-if-(vcif).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | vcif 4 | source.ruby.rails 5 | validates_confirmation_of if 6 | 7 | -------------------------------------------------------------------------------- /validates_exclusion_of-(ve).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | ve 4 | source.ruby.rails 5 | validates_exclusion_of 6 | 7 | -------------------------------------------------------------------------------- /validates_exclusion_of-if-(veif).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | veif 4 | source.ruby.rails 5 | validates_exclusion_of if 6 | 7 | -------------------------------------------------------------------------------- /validates_format_of-if.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | vfif 4 | source.ruby.rails 5 | validates_format_of if 6 | 7 | -------------------------------------------------------------------------------- /validates_format_of.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | vf 4 | source.ruby.rails 5 | validates_format_of 6 | 7 | -------------------------------------------------------------------------------- /validates_inclusion_of-if.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | viif 4 | source.ruby.rails 5 | validates_inclusion_of if 6 | 7 | -------------------------------------------------------------------------------- /validates_inclusion_of.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | vi 4 | source.ruby.rails 5 | validates_inclusion_of 6 | 7 | -------------------------------------------------------------------------------- /validates_length_of-(vl).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | vl 4 | source.ruby.rails 5 | validates_length_of 6 | 7 | -------------------------------------------------------------------------------- /validates_length_of-if.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | vlif 4 | source.ruby.rails 5 | validates_length_of if 6 | 7 | -------------------------------------------------------------------------------- /validates_numericality_of-if.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | vnif 4 | source.ruby.rails 5 | validates_numericality_of if 6 | 7 | -------------------------------------------------------------------------------- /validates_numericality_of.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | vn 4 | source.ruby.rails 5 | validates_numericality_of 6 | 7 | -------------------------------------------------------------------------------- /validates_presence_of-(vp).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | vp 4 | source.ruby.rails 5 | validates_presence_of 6 | 7 | -------------------------------------------------------------------------------- /validates_presence_of-if-(vpif)-2.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | vpif 4 | source.ruby.rails 5 | validates_presence_of if 6 | 7 | -------------------------------------------------------------------------------- /validates_uniqueness_of-(vu).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | vu 4 | source.ruby.rails 5 | validates_uniqueness_of 6 | 7 | -------------------------------------------------------------------------------- /validates_uniqueness_of-if-(vuif).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | vuif 4 | source.ruby.rails 5 | validates_uniqueness_of if 6 | 7 | -------------------------------------------------------------------------------- /verify-(verify).sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 4 | verify 5 | source.ruby.rails 6 | verify — render 7 | 8 | -------------------------------------------------------------------------------- /wants_format.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | format 4 | meta.rails.controller 5 | format.format 6 | 7 | -------------------------------------------------------------------------------- /xhr-delete.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | xdelete 4 | source.ruby.rails 5 | xhr delete 6 | 7 | -------------------------------------------------------------------------------- /xhr-get.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | xget 4 | source.ruby.rails 5 | xhr get 6 | 7 | -------------------------------------------------------------------------------- /xhr-post.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | xpost 4 | source.ruby.rails 5 | xhr post 6 | 7 | -------------------------------------------------------------------------------- /xhr-put.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | xput 4 | source.ruby.rails 5 | xhr put 6 | 7 | --------------------------------------------------------------------------------