From 96b5606d66ea5d36b4ca894c18f6e73fddeb34bf Mon Sep 17 00:00:00 2001 From: capitaomorte Date: Mon, 16 Nov 2009 07:09:38 +0000 Subject: [PATCH] first commit of a million rails snippets, conditions missing, command implementation missing... --- .../ActiveSupport/cattr_accessor.yasnippet | 7 +++++++ .../ActiveSupport/mattr_accessor.yasnippet | 7 +++++++ ...rning do 7Cvariable7C E280A6 end.yasnippet | 9 +++++++++ .../Ajax Tests/xhr delete.yasnippet | 7 +++++++ .../rails-mode/Ajax Tests/xhr get.yasnippet | 7 +++++++ .../rails-mode/Ajax Tests/xhr post.yasnippet | 7 +++++++ .../rails-mode/Ajax Tests/xhr put.yasnippet | 7 +++++++ .../Associations/belongs_to (bt).yasnippet | 7 +++++++ .../has_and_belongs_to_many (habtm).yasnippet | 7 +++++++ .../Associations/has_many (hm).yasnippet | 7 +++++++ .../Associations/has_many (through).yasnippet | 7 +++++++ .../has_many dependent = destroy.yasnippet | 7 +++++++ .../Associations/has_one (ho).yasnippet | 7 +++++++ .../Callbacks/after_create.yasnippet | 7 +++++++ .../Callbacks/after_destroy.yasnippet | 7 +++++++ .../rails-mode/Callbacks/after_save.yasnippet | 7 +++++++ .../Callbacks/after_update.yasnippet | 7 +++++++ .../Callbacks/after_validation.yasnippet | 7 +++++++ .../after_validation_on_create.yasnippet | 7 +++++++ .../after_validation_on_update.yasnippet | 7 +++++++ .../Callbacks/before_create.yasnippet | 7 +++++++ .../Callbacks/before_destroy.yasnippet | 7 +++++++ .../Callbacks/before_save.yasnippet | 7 +++++++ .../Callbacks/before_update.yasnippet | 7 +++++++ .../Callbacks/before_validation.yasnippet | 7 +++++++ .../before_validation_on_create.yasnippet | 7 +++++++ .../before_validation_on_update.yasnippet | 7 +++++++ .../Table column(s) rename.yasnippet | 8 ++++++++ .../t_rename (tre).yasnippet | 8 ++++++++ ...ion Remove and Add Column (mrac).yasnippet | 7 +++++++ .../Create controller class.yasnippet | 16 +++++++++++++++ .../Controllers/rails flash.yasnippet | 7 +++++++ .../Controllers/verify (verify).yasnippet | 7 +++++++ .../verify - redirect (verify).yasnippet | 7 +++++++ .../Create binary column.yasnippet | 8 ++++++++ .../Create boolean column.yasnippet | 8 ++++++++ .../Create date column.yasnippet | 8 ++++++++ .../Create datetime column.yasnippet | 8 ++++++++ .../Create decimal column.yasnippet | 8 ++++++++ .../Create float column.yasnippet | 8 ++++++++ .../Create integer column.yasnippet | 8 ++++++++ .../Create lock_version column.yasnippet | 8 ++++++++ .../Create references column.yasnippet | 8 ++++++++ .../Create string column.yasnippet | 8 ++++++++ .../Create text column.yasnippet | 8 ++++++++ .../Create time column.yasnippet | 8 ++++++++ .../Create timestamp column.yasnippet | 8 ++++++++ .../Create timestamps columns.yasnippet | 8 ++++++++ .../t_binary (tcbi).yasnippet | 8 ++++++++ .../t_boolean (tcb).yasnippet | 8 ++++++++ .../t_date (tcda).yasnippet | 8 ++++++++ .../t_datetime (tcdt).yasnippet | 8 ++++++++ .../t_decimal (tcd).yasnippet | 8 ++++++++ .../t_float (tcf).yasnippet | 8 ++++++++ .../t_integer (tci).yasnippet | 8 ++++++++ .../t_lock_version (tcl).yasnippet | 8 ++++++++ .../t_references (tcr).yasnippet | 8 ++++++++ .../t_string (tcs).yasnippet | 8 ++++++++ .../t_text (tct).yasnippet | 8 ++++++++ .../t_time (tcti).yasnippet | 8 ++++++++ .../t_timestamp (tcts).yasnippet | 8 ++++++++ .../t_timestamps (tctss).yasnippet | 8 ++++++++ .../Database/DB Schema Dump.yasnippet | 7 +++++++ .../Database/DB Schema Import.yasnippet | 7 +++++++ .../Database/Rake Migrate.yasnippet | 7 +++++++ .../180 rails form_tag.yasnippet | 9 +++++++++ .../Make Selection in to Partial.yasnippet | 7 +++++++ .../rails-mode/ERb Templates/end.yasnippet | 7 +++++++ .../ERb Templates/for loop erb.yasnippet | 13 ++++++++++++ .../form_for with errors.yasnippet | 11 ++++++++++ .../ERb Templates/form_for.yasnippet | 9 +++++++++ .../ERb Templates/image_submit_tag.yasnippet | 7 +++++++ .../ERb Templates/map(&3Asym_proc).yasnippet | 7 +++++++ .../ERb Templates/submit_tag.yasnippet | 7 +++++++ .../rails-mode/Finders/find(3Aall).yasnippet | 7 +++++++ .../Finders/find(3Afirst).yasnippet | 7 +++++++ .../rails-mode/Finders/find(id).yasnippet | 7 +++++++ ...= Fixtures_identify(3Asymbol) 3E.yasnippet | 7 +++++++ .../rails-mode/Fixtures/LABEL.yasnippet | 7 +++++++ .../Create functional test class.yasnippet | 11 ++++++++++ .../Test Assert Redirected To (art).yasnippet | 7 +++++++ .../Test Assert Response (are).yasnippet | 7 +++++++ .../assert(var = assigns(3Avar)).yasnippet | 8 ++++++++ ...directed_to (nested path plural).yasnippet | 7 +++++++ ...sert_redirected_to (nested path).yasnippet | 7 +++++++ ...sert_redirected_to (path plural).yasnippet | 7 +++++++ .../assert_redirected_to (path).yasnippet | 7 +++++++ .../Functional Tests/assert_rjs.yasnippet | 7 +++++++ .../Functional Tests/assert_select.yasnippet | 9 +++++++++ .../def get request.yasnippet | 12 +++++++++++ .../def post request.yasnippet | 12 +++++++++++ extras/imported/rails-mode/Generate.yasnippet | 7 +++++++ .../Go To/Go To Alternate File.yasnippet | 7 +++++++ .../Go To/Go To File on This Line.yasnippet | 7 +++++++ .../rails-mode/Go To/Go To File.yasnippet | 7 +++++++ .../Go To/Go To Functional Test.yasnippet | 7 +++++++ .../rails-mode/Go To/Go To Helper.yasnippet | 7 +++++++ .../Go To/Go To Javascript.yasnippet | 7 +++++++ .../Go To/Go To Stylesheet.yasnippet | 7 +++++++ .../Go To/Go To Unit Test.yasnippet | 7 +++++++ .../rails-mode/Go To/Go To View.yasnippet | 7 +++++++ .../Install Bundled Plugin.yasnippet | 7 +++++++ .../Layouts/javascript_include_tag.yasnippet | 7 +++++++ .../Layouts/stylesheet_link_tag.yasnippet | 7 +++++++ ...RAILS_DEFAULT_LOGGER.debug (rdb).yasnippet | 7 +++++++ .../rails-mode/Logger/logger_debug.yasnippet | 7 +++++++ .../rails-mode/Logger/logger_error.yasnippet | 7 +++++++ .../rails-mode/Logger/logger_fatal.yasnippet | 7 +++++++ .../rails-mode/Logger/logger_info.yasnippet | 7 +++++++ .../rails-mode/Logger/logger_warn.yasnippet | 7 +++++++ .../def create - resource.yasnippet | 20 +++++++++++++++++++ .../RJS/page_hide (2Aids).yasnippet | 7 +++++++ ...ert_html (position, id, partial).yasnippet | 7 +++++++ .../RJS/page_replace (id, partial).yasnippet | 7 +++++++ .../page_replace_html (id, partial).yasnippet | 7 +++++++ .../RJS/page_show (2Aids).yasnippet | 7 +++++++ .../RJS/page_toggle (2Aids).yasnippet | 7 +++++++ .../page_visual_effect (effect, id).yasnippet | 7 +++++++ .../rails-mode/Routes/map_catch_all.yasnippet | 7 +++++++ .../Routes/map_named_route.yasnippet | 7 +++++++ .../rails-mode/Routes/map_resource.yasnippet | 9 +++++++++ .../rails-mode/Routes/map_resources.yasnippet | 10 ++++++++++ .../Routes/map_with_options.yasnippet | 9 +++++++++ .../Scopes/named_scope lambda.yasnippet | 7 +++++++ .../rails-mode/Scopes/named_scope.yasnippet | 7 +++++++ .../Migration Create Column (mcc).yasnippet | 8 ++++++++ ...on Create Column Continue (mccc).yasnippet | 8 ++++++++ ...gration Drop Create Table (mdct).yasnippet | 7 +++++++ .../Unit Tests/assert_difference.yasnippet | 9 +++++++++ .../Unit Tests/assert_no_difference.yasnippet | 9 +++++++++ .../validates_acceptance_of if.yasnippet | 7 +++++++ .../validates_acceptance_of.yasnippet | 7 +++++++ .../validates_associated (va).yasnippet | 7 +++++++ .../validates_associated if (vaif).yasnippet | 7 +++++++ .../validates_confirmation_of (vc).yasnippet | 7 +++++++ ...idates_confirmation_of if (vcif).yasnippet | 7 +++++++ .../validates_exclusion_of (ve).yasnippet | 7 +++++++ ...validates_exclusion_of if (veif).yasnippet | 7 +++++++ .../validates_format_of if.yasnippet | 7 +++++++ .../Validations/validates_format_of.yasnippet | 7 +++++++ .../validates_inclusion_of if.yasnippet | 7 +++++++ .../validates_inclusion_of.yasnippet | 7 +++++++ .../validates_length_of (vl).yasnippet | 7 +++++++ .../validates_length_of if.yasnippet | 7 +++++++ .../validates_numericality_of if.yasnippet | 7 +++++++ .../validates_numericality_of.yasnippet | 7 +++++++ .../validates_presence_of (vp).yasnippet | 7 +++++++ ...alidates_presence_of if (vpif) 2.yasnippet | 7 +++++++ .../validates_uniqueness_of (vu).yasnippet | 7 +++++++ ...alidates_uniqueness_of if (vuif).yasnippet | 7 +++++++ .../form_for checkbox.yasnippet | 7 +++++++ .../form_for file_field.yasnippet | 7 +++++++ .../form_for hidden_field.yasnippet | 7 +++++++ .../form_for label.yasnippet | 7 +++++++ .../form_for password_field.yasnippet | 7 +++++++ .../form_for radio_box.yasnippet | 7 +++++++ .../form_for submit.yasnippet | 7 +++++++ .../form_for text_area.yasnippet | 7 +++++++ .../form_for text_field.yasnippet | 7 +++++++ .../form_for check_box.yasnippet | 7 +++++++ .../form_for file_field 2.yasnippet | 7 +++++++ .../form_for hidden_field 2.yasnippet | 7 +++++++ .../form_for label 2.yasnippet | 7 +++++++ .../form_for password_field 2.yasnippet | 7 +++++++ .../form_for radio_box 2.yasnippet | 7 +++++++ .../form_for submit 2.yasnippet | 7 +++++++ .../form_for text_area 2.yasnippet | 7 +++++++ .../form_for text_field 2.yasnippet | 7 +++++++ .../imported/rails-mode/link_to/lia.yasnippet | 7 +++++++ .../rails-mode/link_to/liai.yasnippet | 7 +++++++ .../imported/rails-mode/link_to/lic.yasnippet | 7 +++++++ .../rails-mode/link_to/lica.yasnippet | 7 +++++++ .../rails-mode/link_to/licai.yasnippet | 7 +++++++ .../link_to (nested path plural).yasnippet | 7 +++++++ .../link_to/link_to (nested path).yasnippet | 7 +++++++ .../link_to/link_to (path plural).yasnippet | 7 +++++++ .../link_to/link_to (path).yasnippet | 7 +++++++ .../link_to/link_to model.yasnippet | 7 +++++++ .../rails-mode/rails params.yasnippet | 7 +++++++ .../rails-mode/rails session.yasnippet | 7 +++++++ .../rails-mode/redirect_to/rea.yasnippet | 7 +++++++ .../rails-mode/redirect_to/reai.yasnippet | 7 +++++++ .../rails-mode/redirect_to/rec.yasnippet | 7 +++++++ .../rails-mode/redirect_to/reca.yasnippet | 7 +++++++ .../rails-mode/redirect_to/recai.yasnippet | 7 +++++++ ...redirect_to (nested path plural).yasnippet | 7 +++++++ .../redirect_to (nested path).yasnippet | 7 +++++++ .../redirect_to (path plural).yasnippet | 7 +++++++ .../redirect_to/redirect_to (path).yasnippet | 7 +++++++ .../render/render (action)... (ra).yasnippet | 7 +++++++ .../render (action,layout) (ral).yasnippet | 7 +++++++ .../render/render (file) (rf).yasnippet | 7 +++++++ ...ender (file,use_full_path) (rfu).yasnippet | 7 +++++++ .../render/render (inline) (ri).yasnippet | 7 +++++++ .../render (inline,locals) (ril).yasnippet | 7 +++++++ .../render (inline,type) (rit).yasnippet | 7 +++++++ .../render/render (layout) (rl).yasnippet | 7 +++++++ .../render/render (nothing) (rn).yasnippet | 7 +++++++ .../render (nothing,status) (rns).yasnippet | 7 +++++++ .../render/render (partial) (rp).yasnippet | 7 +++++++ ...ender (partial,collection) (rpc).yasnippet | 7 +++++++ .../render (partial,locals) (rpl).yasnippet | 7 +++++++ .../render (partial,object) (rpo).yasnippet | 7 +++++++ .../render (partial,status) (rps).yasnippet | 7 +++++++ .../render/render (text) (rt).yasnippet | 7 +++++++ .../render (text,layout) (rtl).yasnippet | 7 +++++++ ...nder (text,layout=3Etrue) (rtlt).yasnippet | 7 +++++++ .../render (text,status) (rts).yasnippet | 7 +++++++ .../render/render (update).yasnippet | 9 +++++++++ .../respond_to/respond_to (html).yasnippet | 12 +++++++++++ .../respond_to/respond_to.yasnippet | 9 +++++++++ .../respond_to/wants_format.yasnippet | 7 +++++++ extras/textmate_import.rb | 1 + 213 files changed, 1592 insertions(+) create mode 100644 extras/imported/rails-mode/ActiveSupport/cattr_accessor.yasnippet create mode 100644 extras/imported/rails-mode/ActiveSupport/mattr_accessor.yasnippet create mode 100644 extras/imported/rails-mode/ActiveSupport/returning do 7Cvariable7C E280A6 end.yasnippet create mode 100644 extras/imported/rails-mode/Ajax Tests/xhr delete.yasnippet create mode 100644 extras/imported/rails-mode/Ajax Tests/xhr get.yasnippet create mode 100644 extras/imported/rails-mode/Ajax Tests/xhr post.yasnippet create mode 100644 extras/imported/rails-mode/Ajax Tests/xhr put.yasnippet create mode 100644 extras/imported/rails-mode/Associations/belongs_to (bt).yasnippet create mode 100644 extras/imported/rails-mode/Associations/has_and_belongs_to_many (habtm).yasnippet create mode 100644 extras/imported/rails-mode/Associations/has_many (hm).yasnippet create mode 100644 extras/imported/rails-mode/Associations/has_many (through).yasnippet create mode 100644 extras/imported/rails-mode/Associations/has_many dependent = destroy.yasnippet create mode 100644 extras/imported/rails-mode/Associations/has_one (ho).yasnippet create mode 100644 extras/imported/rails-mode/Callbacks/after_create.yasnippet create mode 100644 extras/imported/rails-mode/Callbacks/after_destroy.yasnippet create mode 100644 extras/imported/rails-mode/Callbacks/after_save.yasnippet create mode 100644 extras/imported/rails-mode/Callbacks/after_update.yasnippet create mode 100644 extras/imported/rails-mode/Callbacks/after_validation.yasnippet create mode 100644 extras/imported/rails-mode/Callbacks/after_validation_on_create.yasnippet create mode 100644 extras/imported/rails-mode/Callbacks/after_validation_on_update.yasnippet create mode 100644 extras/imported/rails-mode/Callbacks/before_create.yasnippet create mode 100644 extras/imported/rails-mode/Callbacks/before_destroy.yasnippet create mode 100644 extras/imported/rails-mode/Callbacks/before_save.yasnippet create mode 100644 extras/imported/rails-mode/Callbacks/before_update.yasnippet create mode 100644 extras/imported/rails-mode/Callbacks/before_validation.yasnippet create mode 100644 extras/imported/rails-mode/Callbacks/before_validation_on_create.yasnippet create mode 100644 extras/imported/rails-mode/Callbacks/before_validation_on_update.yasnippet create mode 100644 extras/imported/rails-mode/Change columns helpers/Table column(s) rename.yasnippet create mode 100644 extras/imported/rails-mode/Change columns t. drop-down list/t_rename (tre).yasnippet create mode 100644 extras/imported/rails-mode/Columns/Migration Remove and Add Column (mrac).yasnippet create mode 100644 extras/imported/rails-mode/Controllers/Create controller class.yasnippet create mode 100644 extras/imported/rails-mode/Controllers/rails flash.yasnippet create mode 100644 extras/imported/rails-mode/Controllers/verify (verify).yasnippet create mode 100644 extras/imported/rails-mode/Controllers/verify - redirect (verify).yasnippet create mode 100644 extras/imported/rails-mode/Create columns helpers/Create binary column.yasnippet create mode 100644 extras/imported/rails-mode/Create columns helpers/Create boolean column.yasnippet create mode 100644 extras/imported/rails-mode/Create columns helpers/Create date column.yasnippet create mode 100644 extras/imported/rails-mode/Create columns helpers/Create datetime column.yasnippet create mode 100644 extras/imported/rails-mode/Create columns helpers/Create decimal column.yasnippet create mode 100644 extras/imported/rails-mode/Create columns helpers/Create float column.yasnippet create mode 100644 extras/imported/rails-mode/Create columns helpers/Create integer column.yasnippet create mode 100644 extras/imported/rails-mode/Create columns helpers/Create lock_version column.yasnippet create mode 100644 extras/imported/rails-mode/Create columns helpers/Create references column.yasnippet create mode 100644 extras/imported/rails-mode/Create columns helpers/Create string column.yasnippet create mode 100644 extras/imported/rails-mode/Create columns helpers/Create text column.yasnippet create mode 100644 extras/imported/rails-mode/Create columns helpers/Create time column.yasnippet create mode 100644 extras/imported/rails-mode/Create columns helpers/Create timestamp column.yasnippet create mode 100644 extras/imported/rails-mode/Create columns helpers/Create timestamps columns.yasnippet create mode 100644 extras/imported/rails-mode/Create columns t. drop-down list/t_binary (tcbi).yasnippet create mode 100644 extras/imported/rails-mode/Create columns t. drop-down list/t_boolean (tcb).yasnippet create mode 100644 extras/imported/rails-mode/Create columns t. drop-down list/t_date (tcda).yasnippet create mode 100644 extras/imported/rails-mode/Create columns t. drop-down list/t_datetime (tcdt).yasnippet create mode 100644 extras/imported/rails-mode/Create columns t. drop-down list/t_decimal (tcd).yasnippet create mode 100644 extras/imported/rails-mode/Create columns t. drop-down list/t_float (tcf).yasnippet create mode 100644 extras/imported/rails-mode/Create columns t. drop-down list/t_integer (tci).yasnippet create mode 100644 extras/imported/rails-mode/Create columns t. drop-down list/t_lock_version (tcl).yasnippet create mode 100644 extras/imported/rails-mode/Create columns t. drop-down list/t_references (tcr).yasnippet create mode 100644 extras/imported/rails-mode/Create columns t. drop-down list/t_string (tcs).yasnippet create mode 100644 extras/imported/rails-mode/Create columns t. drop-down list/t_text (tct).yasnippet create mode 100644 extras/imported/rails-mode/Create columns t. drop-down list/t_time (tcti).yasnippet create mode 100644 extras/imported/rails-mode/Create columns t. drop-down list/t_timestamp (tcts).yasnippet create mode 100644 extras/imported/rails-mode/Create columns t. drop-down list/t_timestamps (tctss).yasnippet create mode 100644 extras/imported/rails-mode/Database/DB Schema Dump.yasnippet create mode 100644 extras/imported/rails-mode/Database/DB Schema Import.yasnippet create mode 100644 extras/imported/rails-mode/Database/Rake Migrate.yasnippet create mode 100644 extras/imported/rails-mode/ERb Templates/180 rails form_tag.yasnippet create mode 100644 extras/imported/rails-mode/ERb Templates/Make Selection in to Partial.yasnippet create mode 100644 extras/imported/rails-mode/ERb Templates/end.yasnippet create mode 100644 extras/imported/rails-mode/ERb Templates/for loop erb.yasnippet create mode 100644 extras/imported/rails-mode/ERb Templates/form_for with errors.yasnippet create mode 100644 extras/imported/rails-mode/ERb Templates/form_for.yasnippet create mode 100644 extras/imported/rails-mode/ERb Templates/image_submit_tag.yasnippet create mode 100644 extras/imported/rails-mode/ERb Templates/map(&3Asym_proc).yasnippet create mode 100644 extras/imported/rails-mode/ERb Templates/submit_tag.yasnippet create mode 100644 extras/imported/rails-mode/Finders/find(3Aall).yasnippet create mode 100644 extras/imported/rails-mode/Finders/find(3Afirst).yasnippet create mode 100644 extras/imported/rails-mode/Finders/find(id).yasnippet create mode 100644 extras/imported/rails-mode/Fixtures/3C= Fixtures_identify(3Asymbol) 3E.yasnippet create mode 100644 extras/imported/rails-mode/Fixtures/LABEL.yasnippet create mode 100644 extras/imported/rails-mode/Functional Tests/Create functional test class.yasnippet create mode 100644 extras/imported/rails-mode/Functional Tests/Test Assert Redirected To (art).yasnippet create mode 100644 extras/imported/rails-mode/Functional Tests/Test Assert Response (are).yasnippet create mode 100644 extras/imported/rails-mode/Functional Tests/assert(var = assigns(3Avar)).yasnippet create mode 100644 extras/imported/rails-mode/Functional Tests/assert_redirected_to (nested path plural).yasnippet create mode 100644 extras/imported/rails-mode/Functional Tests/assert_redirected_to (nested path).yasnippet create mode 100644 extras/imported/rails-mode/Functional Tests/assert_redirected_to (path plural).yasnippet create mode 100644 extras/imported/rails-mode/Functional Tests/assert_redirected_to (path).yasnippet create mode 100644 extras/imported/rails-mode/Functional Tests/assert_rjs.yasnippet create mode 100644 extras/imported/rails-mode/Functional Tests/assert_select.yasnippet create mode 100644 extras/imported/rails-mode/Functional Tests/def get request.yasnippet create mode 100644 extras/imported/rails-mode/Functional Tests/def post request.yasnippet create mode 100644 extras/imported/rails-mode/Generate.yasnippet create mode 100644 extras/imported/rails-mode/Go To/Go To Alternate File.yasnippet create mode 100644 extras/imported/rails-mode/Go To/Go To File on This Line.yasnippet create mode 100644 extras/imported/rails-mode/Go To/Go To File.yasnippet create mode 100644 extras/imported/rails-mode/Go To/Go To Functional Test.yasnippet create mode 100644 extras/imported/rails-mode/Go To/Go To Helper.yasnippet create mode 100644 extras/imported/rails-mode/Go To/Go To Javascript.yasnippet create mode 100644 extras/imported/rails-mode/Go To/Go To Stylesheet.yasnippet create mode 100644 extras/imported/rails-mode/Go To/Go To Unit Test.yasnippet create mode 100644 extras/imported/rails-mode/Go To/Go To View.yasnippet create mode 100644 extras/imported/rails-mode/Install Bundled Plugin.yasnippet create mode 100644 extras/imported/rails-mode/Layouts/javascript_include_tag.yasnippet create mode 100644 extras/imported/rails-mode/Layouts/stylesheet_link_tag.yasnippet create mode 100644 extras/imported/rails-mode/Logger/RAILS_DEFAULT_LOGGER.debug (rdb).yasnippet create mode 100644 extras/imported/rails-mode/Logger/logger_debug.yasnippet create mode 100644 extras/imported/rails-mode/Logger/logger_error.yasnippet create mode 100644 extras/imported/rails-mode/Logger/logger_fatal.yasnippet create mode 100644 extras/imported/rails-mode/Logger/logger_info.yasnippet create mode 100644 extras/imported/rails-mode/Logger/logger_warn.yasnippet create mode 100644 extras/imported/rails-mode/REST methods/def create - resource.yasnippet create mode 100644 extras/imported/rails-mode/RJS/page_hide (2Aids).yasnippet create mode 100644 extras/imported/rails-mode/RJS/page_insert_html (position, id, partial).yasnippet create mode 100644 extras/imported/rails-mode/RJS/page_replace (id, partial).yasnippet create mode 100644 extras/imported/rails-mode/RJS/page_replace_html (id, partial).yasnippet create mode 100644 extras/imported/rails-mode/RJS/page_show (2Aids).yasnippet create mode 100644 extras/imported/rails-mode/RJS/page_toggle (2Aids).yasnippet create mode 100644 extras/imported/rails-mode/RJS/page_visual_effect (effect, id).yasnippet create mode 100644 extras/imported/rails-mode/Routes/map_catch_all.yasnippet create mode 100644 extras/imported/rails-mode/Routes/map_named_route.yasnippet create mode 100644 extras/imported/rails-mode/Routes/map_resource.yasnippet create mode 100644 extras/imported/rails-mode/Routes/map_resources.yasnippet create mode 100644 extras/imported/rails-mode/Routes/map_with_options.yasnippet create mode 100644 extras/imported/rails-mode/Scopes/named_scope lambda.yasnippet create mode 100644 extras/imported/rails-mode/Scopes/named_scope.yasnippet create mode 100644 extras/imported/rails-mode/Tables/Migration Create Column (mcc).yasnippet create mode 100644 extras/imported/rails-mode/Tables/Migration Create Column Continue (mccc).yasnippet create mode 100644 extras/imported/rails-mode/Tables/Migration Drop Create Table (mdct).yasnippet create mode 100644 extras/imported/rails-mode/Unit Tests/assert_difference.yasnippet create mode 100644 extras/imported/rails-mode/Unit Tests/assert_no_difference.yasnippet create mode 100644 extras/imported/rails-mode/Validations/validates_acceptance_of if.yasnippet create mode 100644 extras/imported/rails-mode/Validations/validates_acceptance_of.yasnippet create mode 100644 extras/imported/rails-mode/Validations/validates_associated (va).yasnippet create mode 100644 extras/imported/rails-mode/Validations/validates_associated if (vaif).yasnippet create mode 100644 extras/imported/rails-mode/Validations/validates_confirmation_of (vc).yasnippet create mode 100644 extras/imported/rails-mode/Validations/validates_confirmation_of if (vcif).yasnippet create mode 100644 extras/imported/rails-mode/Validations/validates_exclusion_of (ve).yasnippet create mode 100644 extras/imported/rails-mode/Validations/validates_exclusion_of if (veif).yasnippet create mode 100644 extras/imported/rails-mode/Validations/validates_format_of if.yasnippet create mode 100644 extras/imported/rails-mode/Validations/validates_format_of.yasnippet create mode 100644 extras/imported/rails-mode/Validations/validates_inclusion_of if.yasnippet create mode 100644 extras/imported/rails-mode/Validations/validates_inclusion_of.yasnippet create mode 100644 extras/imported/rails-mode/Validations/validates_length_of (vl).yasnippet create mode 100644 extras/imported/rails-mode/Validations/validates_length_of if.yasnippet create mode 100644 extras/imported/rails-mode/Validations/validates_numericality_of if.yasnippet create mode 100644 extras/imported/rails-mode/Validations/validates_numericality_of.yasnippet create mode 100644 extras/imported/rails-mode/Validations/validates_presence_of (vp).yasnippet create mode 100644 extras/imported/rails-mode/Validations/validates_presence_of if (vpif) 2.yasnippet create mode 100644 extras/imported/rails-mode/Validations/validates_uniqueness_of (vu).yasnippet create mode 100644 extras/imported/rails-mode/Validations/validates_uniqueness_of if (vuif).yasnippet create mode 100644 extras/imported/rails-mode/form_for f. drop-down list/form_for checkbox.yasnippet create mode 100644 extras/imported/rails-mode/form_for f. drop-down list/form_for file_field.yasnippet create mode 100644 extras/imported/rails-mode/form_for f. drop-down list/form_for hidden_field.yasnippet create mode 100644 extras/imported/rails-mode/form_for f. drop-down list/form_for label.yasnippet create mode 100644 extras/imported/rails-mode/form_for f. drop-down list/form_for password_field.yasnippet create mode 100644 extras/imported/rails-mode/form_for f. drop-down list/form_for radio_box.yasnippet create mode 100644 extras/imported/rails-mode/form_for f. drop-down list/form_for submit.yasnippet create mode 100644 extras/imported/rails-mode/form_for f. drop-down list/form_for text_area.yasnippet create mode 100644 extras/imported/rails-mode/form_for f. drop-down list/form_for text_field.yasnippet create mode 100644 extras/imported/rails-mode/form_for helpers/form_for check_box.yasnippet create mode 100644 extras/imported/rails-mode/form_for helpers/form_for file_field 2.yasnippet create mode 100644 extras/imported/rails-mode/form_for helpers/form_for hidden_field 2.yasnippet create mode 100644 extras/imported/rails-mode/form_for helpers/form_for label 2.yasnippet create mode 100644 extras/imported/rails-mode/form_for helpers/form_for password_field 2.yasnippet create mode 100644 extras/imported/rails-mode/form_for helpers/form_for radio_box 2.yasnippet create mode 100644 extras/imported/rails-mode/form_for helpers/form_for submit 2.yasnippet create mode 100644 extras/imported/rails-mode/form_for helpers/form_for text_area 2.yasnippet create mode 100644 extras/imported/rails-mode/form_for helpers/form_for text_field 2.yasnippet create mode 100644 extras/imported/rails-mode/link_to/lia.yasnippet create mode 100644 extras/imported/rails-mode/link_to/liai.yasnippet create mode 100644 extras/imported/rails-mode/link_to/lic.yasnippet create mode 100644 extras/imported/rails-mode/link_to/lica.yasnippet create mode 100644 extras/imported/rails-mode/link_to/licai.yasnippet create mode 100644 extras/imported/rails-mode/link_to/link_to (nested path plural).yasnippet create mode 100644 extras/imported/rails-mode/link_to/link_to (nested path).yasnippet create mode 100644 extras/imported/rails-mode/link_to/link_to (path plural).yasnippet create mode 100644 extras/imported/rails-mode/link_to/link_to (path).yasnippet create mode 100644 extras/imported/rails-mode/link_to/link_to model.yasnippet create mode 100644 extras/imported/rails-mode/rails params.yasnippet create mode 100644 extras/imported/rails-mode/rails session.yasnippet create mode 100644 extras/imported/rails-mode/redirect_to/rea.yasnippet create mode 100644 extras/imported/rails-mode/redirect_to/reai.yasnippet create mode 100644 extras/imported/rails-mode/redirect_to/rec.yasnippet create mode 100644 extras/imported/rails-mode/redirect_to/reca.yasnippet create mode 100644 extras/imported/rails-mode/redirect_to/recai.yasnippet create mode 100644 extras/imported/rails-mode/redirect_to/redirect_to (nested path plural).yasnippet create mode 100644 extras/imported/rails-mode/redirect_to/redirect_to (nested path).yasnippet create mode 100644 extras/imported/rails-mode/redirect_to/redirect_to (path plural).yasnippet create mode 100644 extras/imported/rails-mode/redirect_to/redirect_to (path).yasnippet create mode 100644 extras/imported/rails-mode/render/render (action)... (ra).yasnippet create mode 100644 extras/imported/rails-mode/render/render (action,layout) (ral).yasnippet create mode 100644 extras/imported/rails-mode/render/render (file) (rf).yasnippet create mode 100644 extras/imported/rails-mode/render/render (file,use_full_path) (rfu).yasnippet create mode 100644 extras/imported/rails-mode/render/render (inline) (ri).yasnippet create mode 100644 extras/imported/rails-mode/render/render (inline,locals) (ril).yasnippet create mode 100644 extras/imported/rails-mode/render/render (inline,type) (rit).yasnippet create mode 100644 extras/imported/rails-mode/render/render (layout) (rl).yasnippet create mode 100644 extras/imported/rails-mode/render/render (nothing) (rn).yasnippet create mode 100644 extras/imported/rails-mode/render/render (nothing,status) (rns).yasnippet create mode 100644 extras/imported/rails-mode/render/render (partial) (rp).yasnippet create mode 100644 extras/imported/rails-mode/render/render (partial,collection) (rpc).yasnippet create mode 100644 extras/imported/rails-mode/render/render (partial,locals) (rpl).yasnippet create mode 100644 extras/imported/rails-mode/render/render (partial,object) (rpo).yasnippet create mode 100644 extras/imported/rails-mode/render/render (partial,status) (rps).yasnippet create mode 100644 extras/imported/rails-mode/render/render (text) (rt).yasnippet create mode 100644 extras/imported/rails-mode/render/render (text,layout) (rtl).yasnippet create mode 100644 extras/imported/rails-mode/render/render (text,layout=3Etrue) (rtlt).yasnippet create mode 100644 extras/imported/rails-mode/render/render (text,status) (rts).yasnippet create mode 100644 extras/imported/rails-mode/render/render (update).yasnippet create mode 100644 extras/imported/rails-mode/respond_to/respond_to (html).yasnippet create mode 100644 extras/imported/rails-mode/respond_to/respond_to.yasnippet create mode 100644 extras/imported/rails-mode/respond_to/wants_format.yasnippet diff --git a/extras/imported/rails-mode/ActiveSupport/cattr_accessor.yasnippet b/extras/imported/rails-mode/ActiveSupport/cattr_accessor.yasnippet new file mode 100644 index 0000000..a01fc8f --- /dev/null +++ b/extras/imported/rails-mode/ActiveSupport/cattr_accessor.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: crw +# contributor: Translated from TextMate Snippet +# name: cattr_accessor +## condition: "source.ruby.rails" +# -- +cattr_accessor :${0:attr_names} \ No newline at end of file diff --git a/extras/imported/rails-mode/ActiveSupport/mattr_accessor.yasnippet b/extras/imported/rails-mode/ActiveSupport/mattr_accessor.yasnippet new file mode 100644 index 0000000..39a0f6b --- /dev/null +++ b/extras/imported/rails-mode/ActiveSupport/mattr_accessor.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: mrw +# contributor: Translated from TextMate Snippet +# name: mattr_accessor +## condition: "source.ruby.rails" +# -- +mattr_accessor :${0:attr_names} \ No newline at end of file diff --git a/extras/imported/rails-mode/ActiveSupport/returning do 7Cvariable7C E280A6 end.yasnippet b/extras/imported/rails-mode/ActiveSupport/returning do 7Cvariable7C E280A6 end.yasnippet new file mode 100644 index 0000000..bc351c0 --- /dev/null +++ b/extras/imported/rails-mode/ActiveSupport/returning do 7Cvariable7C E280A6 end.yasnippet @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# key: returning +# contributor: Translated from TextMate Snippet +# name: returning do |variable| … end +## condition: "source.ruby.rails" +# -- +returning ${1:variable} do${2:$(if (string= "" yas/text) "" " |")}${2:v}${2:$(if (string= "" yas/text) "" "|")} + $0 +end \ No newline at end of file diff --git a/extras/imported/rails-mode/Ajax Tests/xhr delete.yasnippet b/extras/imported/rails-mode/Ajax Tests/xhr delete.yasnippet new file mode 100644 index 0000000..1048efb --- /dev/null +++ b/extras/imported/rails-mode/Ajax Tests/xhr delete.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: xdelete +# contributor: Translated from TextMate Snippet +# name: xhr delete +## condition: "source.ruby.rails" +# -- +xhr :delete, :${1:destroy}, :id => ${2:1}$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Ajax Tests/xhr get.yasnippet b/extras/imported/rails-mode/Ajax Tests/xhr get.yasnippet new file mode 100644 index 0000000..30432b2 --- /dev/null +++ b/extras/imported/rails-mode/Ajax Tests/xhr get.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: xget +# contributor: Translated from TextMate Snippet +# name: xhr get +## condition: "source.ruby.rails" +# -- +xhr :get, :${1:show}${2:, :id => ${3:1}}$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Ajax Tests/xhr post.yasnippet b/extras/imported/rails-mode/Ajax Tests/xhr post.yasnippet new file mode 100644 index 0000000..ffa7345 --- /dev/null +++ b/extras/imported/rails-mode/Ajax Tests/xhr post.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: xpost +# contributor: Translated from TextMate Snippet +# name: xhr post +## condition: "source.ruby.rails" +# -- +xhr :post, :${1:create}, :${2:object} => { $3 } \ No newline at end of file diff --git a/extras/imported/rails-mode/Ajax Tests/xhr put.yasnippet b/extras/imported/rails-mode/Ajax Tests/xhr put.yasnippet new file mode 100644 index 0000000..8f6d225 --- /dev/null +++ b/extras/imported/rails-mode/Ajax Tests/xhr put.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: xput +# contributor: Translated from TextMate Snippet +# name: xhr put +## condition: "source.ruby.rails" +# -- +xhr :put, :${1:update}, :id => ${2:1}, :${3:object} => { $4 }$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Associations/belongs_to (bt).yasnippet b/extras/imported/rails-mode/Associations/belongs_to (bt).yasnippet new file mode 100644 index 0000000..86d41f2 --- /dev/null +++ b/extras/imported/rails-mode/Associations/belongs_to (bt).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: bt +# contributor: Translated from TextMate Snippet +# name: belongs_to +## condition: "source.ruby.rails" +# -- +belongs_to :${1:object}${2:, :class_name => "${3:${1:$(replace-regexp-in-string "_" "" (capitalize yas/text))}}", :foreign_key => "${4:$1_id}"} \ No newline at end of file diff --git a/extras/imported/rails-mode/Associations/has_and_belongs_to_many (habtm).yasnippet b/extras/imported/rails-mode/Associations/has_and_belongs_to_many (habtm).yasnippet new file mode 100644 index 0000000..549941a --- /dev/null +++ b/extras/imported/rails-mode/Associations/has_and_belongs_to_many (habtm).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: habtm +# contributor: Translated from TextMate Snippet +# name: has_and_belongs_to_many +## condition: "source.ruby.rails" +# -- +has_and_belongs_to_many :${1:object}${2:, :join_table => "${3:table_name}", :foreign_key => "${4:$1_id}"} \ No newline at end of file diff --git a/extras/imported/rails-mode/Associations/has_many (hm).yasnippet b/extras/imported/rails-mode/Associations/has_many (hm).yasnippet new file mode 100644 index 0000000..d5f875c --- /dev/null +++ b/extras/imported/rails-mode/Associations/has_many (hm).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: hm +# contributor: Translated from TextMate Snippet +# name: has_many +## condition: "source.ruby.rails" +# -- +has_many :${1:object}s${2:, :class_name => "${1}", :foreign_key => "${4:reference}_id"} \ No newline at end of file diff --git a/extras/imported/rails-mode/Associations/has_many (through).yasnippet b/extras/imported/rails-mode/Associations/has_many (through).yasnippet new file mode 100644 index 0000000..2fdc962 --- /dev/null +++ b/extras/imported/rails-mode/Associations/has_many (through).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: hmt +# contributor: Translated from TextMate Snippet +# name: has_many (through) +## condition: "source.ruby.rails" +# -- +has_many :${1:objects}, :through => :${2:join_association}${3:, :source => :${4:$2_table_foreign_key_to_$1_table}} \ No newline at end of file diff --git a/extras/imported/rails-mode/Associations/has_many dependent = destroy.yasnippet b/extras/imported/rails-mode/Associations/has_many dependent = destroy.yasnippet new file mode 100644 index 0000000..da237d8 --- /dev/null +++ b/extras/imported/rails-mode/Associations/has_many dependent = destroy.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: hmd +# contributor: Translated from TextMate Snippet +# name: has_many :dependent => :destroy +## condition: "source.ruby.rails" +# -- +has_many :${1:object}s${2:, :class_name => "$1", :foreign_key => "${4:reference}_id"}, :dependent => :destroy$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Associations/has_one (ho).yasnippet b/extras/imported/rails-mode/Associations/has_one (ho).yasnippet new file mode 100644 index 0000000..b0afd1e --- /dev/null +++ b/extras/imported/rails-mode/Associations/has_one (ho).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: ho +# contributor: Translated from TextMate Snippet +# name: has_one +## condition: "source.ruby.rails" +# -- +has_one :${1:object}${2:, :class_name => "${3:${1/[[:alpha:]]+|(_)/(?1::\u$0)/g}}", :foreign_key => "${4:${1}_id}"} \ No newline at end of file diff --git a/extras/imported/rails-mode/Callbacks/after_create.yasnippet b/extras/imported/rails-mode/Callbacks/after_create.yasnippet new file mode 100644 index 0000000..ffb9fa6 --- /dev/null +++ b/extras/imported/rails-mode/Callbacks/after_create.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: aftc +# contributor: Translated from TextMate Snippet +# name: after_create +## condition: "source.ruby.rails" +# -- +after_create \ No newline at end of file diff --git a/extras/imported/rails-mode/Callbacks/after_destroy.yasnippet b/extras/imported/rails-mode/Callbacks/after_destroy.yasnippet new file mode 100644 index 0000000..2383f34 --- /dev/null +++ b/extras/imported/rails-mode/Callbacks/after_destroy.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: aftd +# contributor: Translated from TextMate Snippet +# name: after_destroy +## condition: "source.ruby.rails" +# -- +after_destroy \ No newline at end of file diff --git a/extras/imported/rails-mode/Callbacks/after_save.yasnippet b/extras/imported/rails-mode/Callbacks/after_save.yasnippet new file mode 100644 index 0000000..b2f542c --- /dev/null +++ b/extras/imported/rails-mode/Callbacks/after_save.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: afts +# contributor: Translated from TextMate Snippet +# name: after_save +## condition: "source.ruby.rails" +# -- +after_save \ No newline at end of file diff --git a/extras/imported/rails-mode/Callbacks/after_update.yasnippet b/extras/imported/rails-mode/Callbacks/after_update.yasnippet new file mode 100644 index 0000000..180c75b --- /dev/null +++ b/extras/imported/rails-mode/Callbacks/after_update.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: aftu +# contributor: Translated from TextMate Snippet +# name: after_update +## condition: "source.ruby.rails" +# -- +after_update \ No newline at end of file diff --git a/extras/imported/rails-mode/Callbacks/after_validation.yasnippet b/extras/imported/rails-mode/Callbacks/after_validation.yasnippet new file mode 100644 index 0000000..b9ee613 --- /dev/null +++ b/extras/imported/rails-mode/Callbacks/after_validation.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: aftv +# contributor: Translated from TextMate Snippet +# name: after_validation +## condition: "source.ruby.rails" +# -- +after_validation \ No newline at end of file diff --git a/extras/imported/rails-mode/Callbacks/after_validation_on_create.yasnippet b/extras/imported/rails-mode/Callbacks/after_validation_on_create.yasnippet new file mode 100644 index 0000000..0479f36 --- /dev/null +++ b/extras/imported/rails-mode/Callbacks/after_validation_on_create.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: aftvoc +# contributor: Translated from TextMate Snippet +# name: after_validation_on_create +## condition: "source.ruby.rails" +# -- +after_validation_on_create \ No newline at end of file diff --git a/extras/imported/rails-mode/Callbacks/after_validation_on_update.yasnippet b/extras/imported/rails-mode/Callbacks/after_validation_on_update.yasnippet new file mode 100644 index 0000000..718736f --- /dev/null +++ b/extras/imported/rails-mode/Callbacks/after_validation_on_update.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: aftvou +# contributor: Translated from TextMate Snippet +# name: after_validation_on_update +## condition: "source.ruby.rails" +# -- +after_validation_on_update \ No newline at end of file diff --git a/extras/imported/rails-mode/Callbacks/before_create.yasnippet b/extras/imported/rails-mode/Callbacks/before_create.yasnippet new file mode 100644 index 0000000..687a056 --- /dev/null +++ b/extras/imported/rails-mode/Callbacks/before_create.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: befc +# contributor: Translated from TextMate Snippet +# name: before_create +## condition: "source.ruby.rails" +# -- +before_create \ No newline at end of file diff --git a/extras/imported/rails-mode/Callbacks/before_destroy.yasnippet b/extras/imported/rails-mode/Callbacks/before_destroy.yasnippet new file mode 100644 index 0000000..514225d --- /dev/null +++ b/extras/imported/rails-mode/Callbacks/before_destroy.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: befd +# contributor: Translated from TextMate Snippet +# name: before_destroy +## condition: "source.ruby.rails" +# -- +before_destroy \ No newline at end of file diff --git a/extras/imported/rails-mode/Callbacks/before_save.yasnippet b/extras/imported/rails-mode/Callbacks/before_save.yasnippet new file mode 100644 index 0000000..fbac40a --- /dev/null +++ b/extras/imported/rails-mode/Callbacks/before_save.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: befs +# contributor: Translated from TextMate Snippet +# name: before_save +## condition: "source.ruby.rails" +# -- +before_save \ No newline at end of file diff --git a/extras/imported/rails-mode/Callbacks/before_update.yasnippet b/extras/imported/rails-mode/Callbacks/before_update.yasnippet new file mode 100644 index 0000000..db6d3f0 --- /dev/null +++ b/extras/imported/rails-mode/Callbacks/before_update.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: befu +# contributor: Translated from TextMate Snippet +# name: before_update +## condition: "source.ruby.rails" +# -- +before_update \ No newline at end of file diff --git a/extras/imported/rails-mode/Callbacks/before_validation.yasnippet b/extras/imported/rails-mode/Callbacks/before_validation.yasnippet new file mode 100644 index 0000000..3b54c99 --- /dev/null +++ b/extras/imported/rails-mode/Callbacks/before_validation.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: befv +# contributor: Translated from TextMate Snippet +# name: before_validation +## condition: "source.ruby.rails" +# -- +before_validation \ No newline at end of file diff --git a/extras/imported/rails-mode/Callbacks/before_validation_on_create.yasnippet b/extras/imported/rails-mode/Callbacks/before_validation_on_create.yasnippet new file mode 100644 index 0000000..a45985a --- /dev/null +++ b/extras/imported/rails-mode/Callbacks/before_validation_on_create.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: befvoc +# contributor: Translated from TextMate Snippet +# name: before_validation_on_create +## condition: "source.ruby.rails" +# -- +before_validation_on_create \ No newline at end of file diff --git a/extras/imported/rails-mode/Callbacks/before_validation_on_update.yasnippet b/extras/imported/rails-mode/Callbacks/before_validation_on_update.yasnippet new file mode 100644 index 0000000..ee3f690 --- /dev/null +++ b/extras/imported/rails-mode/Callbacks/before_validation_on_update.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: befvou +# contributor: Translated from TextMate Snippet +# name: before_validation_on_update +## condition: "source.ruby.rails" +# -- +before_validation_on_update \ No newline at end of file diff --git a/extras/imported/rails-mode/Change columns helpers/Table column(s) rename.yasnippet b/extras/imported/rails-mode/Change columns helpers/Table column(s) rename.yasnippet new file mode 100644 index 0000000..9722830 --- /dev/null +++ b/extras/imported/rails-mode/Change columns helpers/Table column(s) rename.yasnippet @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# key: tre +# contributor: Translated from TextMate Snippet +# name: Table column(s) rename +## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table" +# -- +t.rename(:${1:old_column_name}, :${2:new_column_name}) +$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Change columns t. drop-down list/t_rename (tre).yasnippet b/extras/imported/rails-mode/Change columns t. drop-down list/t_rename (tre).yasnippet new file mode 100644 index 0000000..de47ad1 --- /dev/null +++ b/extras/imported/rails-mode/Change columns t. drop-down list/t_rename (tre).yasnippet @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# key: t. +# contributor: Translated from TextMate Snippet +# name: t.rename (tre) +## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table" +# -- +t.rename(:${1:old_column_name}, :${2:new_column_name}) +t.$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Columns/Migration Remove and Add Column (mrac).yasnippet b/extras/imported/rails-mode/Columns/Migration Remove and Add Column (mrac).yasnippet new file mode 100644 index 0000000..1247b66 --- /dev/null +++ b/extras/imported/rails-mode/Columns/Migration Remove and Add Column (mrac).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: mcol +# contributor: Translated from TextMate Snippet +# name: Remove / Add Column +## condition: "meta.rails.migration - meta.rails.migration.create_table - meta.rails.migration.change_table" +# -- +remove_column :${1:table}, :${2:column}${3: [press tab twice to generate add_column]} \ No newline at end of file diff --git a/extras/imported/rails-mode/Controllers/Create controller class.yasnippet b/extras/imported/rails-mode/Controllers/Create controller class.yasnippet new file mode 100644 index 0000000..31c8d52 --- /dev/null +++ b/extras/imported/rails-mode/Controllers/Create controller class.yasnippet @@ -0,0 +1,16 @@ +# -*- mode: snippet -*- +# key: cla +# contributor: Translated from TextMate Snippet +# name: Create controller class +## condition: "source.ruby" +# -- +class ${1:Model}Controller < ApplicationController + before_filter :find_${2:model} + + $0 + + private + def find_${2} + @$2 = ${3:$1}.find(params[:id]) if params[:id] + end +end \ No newline at end of file diff --git a/extras/imported/rails-mode/Controllers/rails flash.yasnippet b/extras/imported/rails-mode/Controllers/rails flash.yasnippet new file mode 100644 index 0000000..6177a8f --- /dev/null +++ b/extras/imported/rails-mode/Controllers/rails flash.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: flash +# contributor: Translated from TextMate Snippet +# name: flash[…] +## condition: "source.ruby.rails" +# -- +flash[:${1:notice}] = "${2:Successfully created...}"$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Controllers/verify (verify).yasnippet b/extras/imported/rails-mode/Controllers/verify (verify).yasnippet new file mode 100644 index 0000000..f247663 --- /dev/null +++ b/extras/imported/rails-mode/Controllers/verify (verify).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: verify +# contributor: Translated from TextMate Snippet +# name: verify — render +## condition: "source.ruby.rails" +# -- +verify :only => [:$1], :method => :post, :render => {:status => 500, :text => "use HTTP-POST"} diff --git a/extras/imported/rails-mode/Controllers/verify - redirect (verify).yasnippet b/extras/imported/rails-mode/Controllers/verify - redirect (verify).yasnippet new file mode 100644 index 0000000..fbedd2a --- /dev/null +++ b/extras/imported/rails-mode/Controllers/verify - redirect (verify).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: verify +# contributor: Translated from TextMate Snippet +# name: verify — redirect +## condition: "source.ruby.rails" +# -- +verify :only => [:$1], :session => :user, :params => :id, :redirect_to => {:action => '${2:index}'} diff --git a/extras/imported/rails-mode/Create columns helpers/Create binary column.yasnippet b/extras/imported/rails-mode/Create columns helpers/Create binary column.yasnippet new file mode 100644 index 0000000..9a90743 --- /dev/null +++ b/extras/imported/rails-mode/Create columns helpers/Create binary column.yasnippet @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# key: tcbi +# contributor: Translated from TextMate Snippet +# name: Table column binary +## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table" +# -- +t.binary :${1:title}${2:, :limit => ${3:2}.megabytes} +$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Create columns helpers/Create boolean column.yasnippet b/extras/imported/rails-mode/Create columns helpers/Create boolean column.yasnippet new file mode 100644 index 0000000..6b51f30 --- /dev/null +++ b/extras/imported/rails-mode/Create columns helpers/Create boolean column.yasnippet @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# key: tcb +# contributor: Translated from TextMate Snippet +# name: Table column boolean +## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table" +# -- +t.boolean :${1:title} +$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Create columns helpers/Create date column.yasnippet b/extras/imported/rails-mode/Create columns helpers/Create date column.yasnippet new file mode 100644 index 0000000..2deb669 --- /dev/null +++ b/extras/imported/rails-mode/Create columns helpers/Create date column.yasnippet @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# key: tcda +# contributor: Translated from TextMate Snippet +# name: Table column date +## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table" +# -- +t.date :${1:title} +$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Create columns helpers/Create datetime column.yasnippet b/extras/imported/rails-mode/Create columns helpers/Create datetime column.yasnippet new file mode 100644 index 0000000..25f28af --- /dev/null +++ b/extras/imported/rails-mode/Create columns helpers/Create datetime column.yasnippet @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# key: tcdt +# contributor: Translated from TextMate Snippet +# name: Table column datetime +## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table" +# -- +t.datetime :${1:title} +$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Create columns helpers/Create decimal column.yasnippet b/extras/imported/rails-mode/Create columns helpers/Create decimal column.yasnippet new file mode 100644 index 0000000..062fc3b --- /dev/null +++ b/extras/imported/rails-mode/Create columns helpers/Create decimal column.yasnippet @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# key: tcd +# contributor: Translated from TextMate Snippet +# name: Table column decimal +## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table" +# -- +t.decimal :${1:title}${2:${3:, :precision => ${4:10}}${5:, :scale => ${6:2}}} +$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Create columns helpers/Create float column.yasnippet b/extras/imported/rails-mode/Create columns helpers/Create float column.yasnippet new file mode 100644 index 0000000..ec048f8 --- /dev/null +++ b/extras/imported/rails-mode/Create columns helpers/Create float column.yasnippet @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# key: tcf +# contributor: Translated from TextMate Snippet +# name: Table column float +## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table" +# -- +t.float :${1:title} +$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Create columns helpers/Create integer column.yasnippet b/extras/imported/rails-mode/Create columns helpers/Create integer column.yasnippet new file mode 100644 index 0000000..48e38e5 --- /dev/null +++ b/extras/imported/rails-mode/Create columns helpers/Create integer column.yasnippet @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# key: tci +# contributor: Translated from TextMate Snippet +# name: Table column integer +## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table" +# -- +t.integer :${1:title} +$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Create columns helpers/Create lock_version column.yasnippet b/extras/imported/rails-mode/Create columns helpers/Create lock_version column.yasnippet new file mode 100644 index 0000000..dcb2014 --- /dev/null +++ b/extras/imported/rails-mode/Create columns helpers/Create lock_version column.yasnippet @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# key: tcl +# contributor: Translated from TextMate Snippet +# name: Table column lock_version +## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table" +# -- +t.integer :lock_version, :null => false, :default => 0 +$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Create columns helpers/Create references column.yasnippet b/extras/imported/rails-mode/Create columns helpers/Create references column.yasnippet new file mode 100644 index 0000000..ba5de28 --- /dev/null +++ b/extras/imported/rails-mode/Create columns helpers/Create references column.yasnippet @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# key: tcr +# contributor: Translated from TextMate Snippet +# name: Table column(s) references +## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table" +# -- +t.references :${1:taggable}${2:, :polymorphic => ${3:{ :default => '${4:Photo}' \}}} +$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Create columns helpers/Create string column.yasnippet b/extras/imported/rails-mode/Create columns helpers/Create string column.yasnippet new file mode 100644 index 0000000..2befb63 --- /dev/null +++ b/extras/imported/rails-mode/Create columns helpers/Create string column.yasnippet @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# key: tcs +# contributor: Translated from TextMate Snippet +# name: Table column string +## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table" +# -- +t.string :${1:title} +$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Create columns helpers/Create text column.yasnippet b/extras/imported/rails-mode/Create columns helpers/Create text column.yasnippet new file mode 100644 index 0000000..bc8d833 --- /dev/null +++ b/extras/imported/rails-mode/Create columns helpers/Create text column.yasnippet @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# key: tct +# contributor: Translated from TextMate Snippet +# name: Table column text +## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table" +# -- +t.text :${1:title} +$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Create columns helpers/Create time column.yasnippet b/extras/imported/rails-mode/Create columns helpers/Create time column.yasnippet new file mode 100644 index 0000000..f76f3f3 --- /dev/null +++ b/extras/imported/rails-mode/Create columns helpers/Create time column.yasnippet @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# key: tcti +# contributor: Translated from TextMate Snippet +# name: Table column time +## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table" +# -- +t.time :${1:title} +$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Create columns helpers/Create timestamp column.yasnippet b/extras/imported/rails-mode/Create columns helpers/Create timestamp column.yasnippet new file mode 100644 index 0000000..88909ff --- /dev/null +++ b/extras/imported/rails-mode/Create columns helpers/Create timestamp column.yasnippet @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# key: tcts +# contributor: Translated from TextMate Snippet +# name: Table column timestamp +## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table" +# -- +t.timestamp :${1:title} +$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Create columns helpers/Create timestamps columns.yasnippet b/extras/imported/rails-mode/Create columns helpers/Create timestamps columns.yasnippet new file mode 100644 index 0000000..bb887b7 --- /dev/null +++ b/extras/imported/rails-mode/Create columns helpers/Create timestamps columns.yasnippet @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# key: tctss +# contributor: Translated from TextMate Snippet +# name: Table column timestamps +## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table" +# -- +t.timestamps +$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Create columns t. drop-down list/t_binary (tcbi).yasnippet b/extras/imported/rails-mode/Create columns t. drop-down list/t_binary (tcbi).yasnippet new file mode 100644 index 0000000..dfe5f4f --- /dev/null +++ b/extras/imported/rails-mode/Create columns t. drop-down list/t_binary (tcbi).yasnippet @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# key: t. +# contributor: Translated from TextMate Snippet +# name: t.binary (tcbi) +## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table" +# -- +t.binary :${1:title}${2:, :limit => ${3:2}.megabytes} +t.$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Create columns t. drop-down list/t_boolean (tcb).yasnippet b/extras/imported/rails-mode/Create columns t. drop-down list/t_boolean (tcb).yasnippet new file mode 100644 index 0000000..16c8489 --- /dev/null +++ b/extras/imported/rails-mode/Create columns t. drop-down list/t_boolean (tcb).yasnippet @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# key: t. +# contributor: Translated from TextMate Snippet +# name: t.boolean (tcb) +## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table" +# -- +t.boolean :${1:title} +t.$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Create columns t. drop-down list/t_date (tcda).yasnippet b/extras/imported/rails-mode/Create columns t. drop-down list/t_date (tcda).yasnippet new file mode 100644 index 0000000..d9973ba --- /dev/null +++ b/extras/imported/rails-mode/Create columns t. drop-down list/t_date (tcda).yasnippet @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# key: t. +# contributor: Translated from TextMate Snippet +# name: t.date (tcda) +## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table" +# -- +t.date :${1:title} +t.$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Create columns t. drop-down list/t_datetime (tcdt).yasnippet b/extras/imported/rails-mode/Create columns t. drop-down list/t_datetime (tcdt).yasnippet new file mode 100644 index 0000000..f7b5050 --- /dev/null +++ b/extras/imported/rails-mode/Create columns t. drop-down list/t_datetime (tcdt).yasnippet @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# key: t. +# contributor: Translated from TextMate Snippet +# name: t.datetime (tcdt) +## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table" +# -- +t.datetime :${1:title} +t.$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Create columns t. drop-down list/t_decimal (tcd).yasnippet b/extras/imported/rails-mode/Create columns t. drop-down list/t_decimal (tcd).yasnippet new file mode 100644 index 0000000..a60fa6e --- /dev/null +++ b/extras/imported/rails-mode/Create columns t. drop-down list/t_decimal (tcd).yasnippet @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# key: t. +# contributor: Translated from TextMate Snippet +# name: t.decimal (tcd) +## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table" +# -- +t.decimal :${1:title}${2:${3:, :precision => ${4:10}}${5:, :scale => ${6:2}}} +t.$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Create columns t. drop-down list/t_float (tcf).yasnippet b/extras/imported/rails-mode/Create columns t. drop-down list/t_float (tcf).yasnippet new file mode 100644 index 0000000..982ad40 --- /dev/null +++ b/extras/imported/rails-mode/Create columns t. drop-down list/t_float (tcf).yasnippet @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# key: t. +# contributor: Translated from TextMate Snippet +# name: t.float (tcf) +## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table" +# -- +t.float :${1:title} +t.$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Create columns t. drop-down list/t_integer (tci).yasnippet b/extras/imported/rails-mode/Create columns t. drop-down list/t_integer (tci).yasnippet new file mode 100644 index 0000000..2005a67 --- /dev/null +++ b/extras/imported/rails-mode/Create columns t. drop-down list/t_integer (tci).yasnippet @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# key: t. +# contributor: Translated from TextMate Snippet +# name: t.integer (tci) +## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table" +# -- +t.integer :${1:title} +t.$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Create columns t. drop-down list/t_lock_version (tcl).yasnippet b/extras/imported/rails-mode/Create columns t. drop-down list/t_lock_version (tcl).yasnippet new file mode 100644 index 0000000..4aab54f --- /dev/null +++ b/extras/imported/rails-mode/Create columns t. drop-down list/t_lock_version (tcl).yasnippet @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# key: t. +# contributor: Translated from TextMate Snippet +# name: t.lock_version (tcl) +## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table" +# -- +t.integer :lock_version, :null => false, :default => 0 +t.$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Create columns t. drop-down list/t_references (tcr).yasnippet b/extras/imported/rails-mode/Create columns t. drop-down list/t_references (tcr).yasnippet new file mode 100644 index 0000000..2cfbb86 --- /dev/null +++ b/extras/imported/rails-mode/Create columns t. drop-down list/t_references (tcr).yasnippet @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# key: t. +# contributor: Translated from TextMate Snippet +# name: t.references (tcr) +## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table" +# -- +t.references :${1:taggable}${2:, :polymorphic => ${3:{ :default => '${4:Photo}' \}}} +t.$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Create columns t. drop-down list/t_string (tcs).yasnippet b/extras/imported/rails-mode/Create columns t. drop-down list/t_string (tcs).yasnippet new file mode 100644 index 0000000..ad7d197 --- /dev/null +++ b/extras/imported/rails-mode/Create columns t. drop-down list/t_string (tcs).yasnippet @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# key: t. +# contributor: Translated from TextMate Snippet +# name: t.string (tcs) +## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table" +# -- +t.string :${1:title} +t.$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Create columns t. drop-down list/t_text (tct).yasnippet b/extras/imported/rails-mode/Create columns t. drop-down list/t_text (tct).yasnippet new file mode 100644 index 0000000..f8a5237 --- /dev/null +++ b/extras/imported/rails-mode/Create columns t. drop-down list/t_text (tct).yasnippet @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# key: t. +# contributor: Translated from TextMate Snippet +# name: t.text (tct) +## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table" +# -- +t.text :${1:title} +t.$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Create columns t. drop-down list/t_time (tcti).yasnippet b/extras/imported/rails-mode/Create columns t. drop-down list/t_time (tcti).yasnippet new file mode 100644 index 0000000..9c76322 --- /dev/null +++ b/extras/imported/rails-mode/Create columns t. drop-down list/t_time (tcti).yasnippet @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# key: t. +# contributor: Translated from TextMate Snippet +# name: t.time (tcti) +## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table" +# -- +t.time :${1:title} +t.$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Create columns t. drop-down list/t_timestamp (tcts).yasnippet b/extras/imported/rails-mode/Create columns t. drop-down list/t_timestamp (tcts).yasnippet new file mode 100644 index 0000000..26bd76d --- /dev/null +++ b/extras/imported/rails-mode/Create columns t. drop-down list/t_timestamp (tcts).yasnippet @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# key: t. +# contributor: Translated from TextMate Snippet +# name: t.timestamp (tcts) +## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table" +# -- +t.timestamp :${1:title} +t.$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Create columns t. drop-down list/t_timestamps (tctss).yasnippet b/extras/imported/rails-mode/Create columns t. drop-down list/t_timestamps (tctss).yasnippet new file mode 100644 index 0000000..883eac5 --- /dev/null +++ b/extras/imported/rails-mode/Create columns t. drop-down list/t_timestamps (tctss).yasnippet @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# key: t. +# contributor: Translated from TextMate Snippet +# name: t.timestamps (tctss) +## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table" +# -- +t.timestamps +t.$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Database/DB Schema Dump.yasnippet b/extras/imported/rails-mode/Database/DB Schema Dump.yasnippet new file mode 100644 index 0000000..d6e07e1 --- /dev/null +++ b/extras/imported/rails-mode/Database/DB Schema Dump.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# type: command +# contributor: Translated from TextMate Snippet +# name: Dump DB to schema.rb +## binding: "^|" +## condition: "source.ruby.rails, source.yaml" +# -- diff --git a/extras/imported/rails-mode/Database/DB Schema Import.yasnippet b/extras/imported/rails-mode/Database/DB Schema Import.yasnippet new file mode 100644 index 0000000..32584d5 --- /dev/null +++ b/extras/imported/rails-mode/Database/DB Schema Import.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# type: command +# contributor: Translated from TextMate Snippet +# name: Load schema.rb to DB +## binding: "^|" +## condition: "source.ruby.rails, source.yaml" +# -- diff --git a/extras/imported/rails-mode/Database/Rake Migrate.yasnippet b/extras/imported/rails-mode/Database/Rake Migrate.yasnippet new file mode 100644 index 0000000..f82ab8e --- /dev/null +++ b/extras/imported/rails-mode/Database/Rake Migrate.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# type: command +# contributor: Translated from TextMate Snippet +# name: Migrate to Current +## binding: "^|" +## condition: "source.ruby.rails, source.yaml" +# -- diff --git a/extras/imported/rails-mode/ERb Templates/180 rails form_tag.yasnippet b/extras/imported/rails-mode/ERb Templates/180 rails form_tag.yasnippet new file mode 100644 index 0000000..97510a8 --- /dev/null +++ b/extras/imported/rails-mode/ERb Templates/180 rails form_tag.yasnippet @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# key: ft +# contributor: Translated from TextMate Snippet +# name: form_tag +## condition: "text.html.ruby, text.haml" +# -- +<% form_tag(${1::action => "${5:update}"}${6:, {:${8:class} => "${9:form}"\}}) do %> + $0 +end \ No newline at end of file diff --git a/extras/imported/rails-mode/ERb Templates/Make Selection in to Partial.yasnippet b/extras/imported/rails-mode/ERb Templates/Make Selection in to Partial.yasnippet new file mode 100644 index 0000000..6f6a2b3 --- /dev/null +++ b/extras/imported/rails-mode/ERb Templates/Make Selection in to Partial.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# type: command +# contributor: Translated from TextMate Snippet +# name: Create Partial From Selection +## binding: "^H" +## condition: "source.ruby.rails, text.html.ruby, text.haml" +# -- diff --git a/extras/imported/rails-mode/ERb Templates/end.yasnippet b/extras/imported/rails-mode/ERb Templates/end.yasnippet new file mode 100644 index 0000000..9eb2cfa --- /dev/null +++ b/extras/imported/rails-mode/ERb Templates/end.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: end +# contributor: Translated from TextMate Snippet +# name: end (ERB) +## condition: "text.html.ruby" +# -- +<% end -%> \ No newline at end of file diff --git a/extras/imported/rails-mode/ERb Templates/for loop erb.yasnippet b/extras/imported/rails-mode/ERb Templates/for loop erb.yasnippet new file mode 100644 index 0000000..c6a74f4 --- /dev/null +++ b/extras/imported/rails-mode/ERb Templates/for loop erb.yasnippet @@ -0,0 +1,13 @@ +# -*- mode: snippet -*- +# key: for +# contributor: Translated from TextMate Snippet +# name: for loop in rhtml +## condition: "text.html.ruby" +# -- +<% if !${1:list}.blank? %> + <% for ${2:item} in ${1} %> + $3 + <% end %> +<% else %> + $4 +<% end %> diff --git a/extras/imported/rails-mode/ERb Templates/form_for with errors.yasnippet b/extras/imported/rails-mode/ERb Templates/form_for with errors.yasnippet new file mode 100644 index 0000000..537c940 --- /dev/null +++ b/extras/imported/rails-mode/ERb Templates/form_for with errors.yasnippet @@ -0,0 +1,11 @@ +# -*- mode: snippet -*- +# key: ffe +# contributor: Translated from TextMate Snippet +# name: form_for with errors +## condition: "text.html.ruby, text.haml" +# -- +<%= error_messages_for :${1:model} %> + +<% form_for @${2:$1} do |f| -%> + $0 +end \ No newline at end of file diff --git a/extras/imported/rails-mode/ERb Templates/form_for.yasnippet b/extras/imported/rails-mode/ERb Templates/form_for.yasnippet new file mode 100644 index 0000000..038fe2e --- /dev/null +++ b/extras/imported/rails-mode/ERb Templates/form_for.yasnippet @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# key: ff +# contributor: Translated from TextMate Snippet +# name: form_for +## condition: "text.html.ruby, text.haml" +# -- +<% form_for @${1:model} do |f| -%> + $0 +end \ No newline at end of file diff --git a/extras/imported/rails-mode/ERb Templates/image_submit_tag.yasnippet b/extras/imported/rails-mode/ERb Templates/image_submit_tag.yasnippet new file mode 100644 index 0000000..73aac9b --- /dev/null +++ b/extras/imported/rails-mode/ERb Templates/image_submit_tag.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: ist +# contributor: Translated from TextMate Snippet +# name: image_submit_tag +## condition: "text.html.ruby, text.haml" +# -- +<%= image_submit_tag("${1:agree.png}"${2:${3:, :id => "${4:${1:$(file-name-sans-extension yas/text)}}"}${5:, :name => "${6:${1:$(file-name-sans-extension yas/text)}}"}${7:, :class => "${8:${1:$(file-name-sans-extension yas/text)}-button}"}${9:, :disabled => ${10:false}}}) %> \ No newline at end of file diff --git a/extras/imported/rails-mode/ERb Templates/map(&3Asym_proc).yasnippet b/extras/imported/rails-mode/ERb Templates/map(&3Asym_proc).yasnippet new file mode 100644 index 0000000..85f3db3 --- /dev/null +++ b/extras/imported/rails-mode/ERb Templates/map(&3Asym_proc).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: mp +# contributor: Translated from TextMate Snippet +# name: map(&:sym_proc) +## condition: "source.ruby.rails" +# -- +map(&:${1:id}) \ No newline at end of file diff --git a/extras/imported/rails-mode/ERb Templates/submit_tag.yasnippet b/extras/imported/rails-mode/ERb Templates/submit_tag.yasnippet new file mode 100644 index 0000000..c213f6d --- /dev/null +++ b/extras/imported/rails-mode/ERb Templates/submit_tag.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: st +# contributor: Translated from TextMate Snippet +# name: submit_tag +## condition: "text.html.ruby, text.haml" +# -- +<%= submit_tag "${1:Save changes}"${2:, :id => "${3:submit}"}${4:, :name => "${5:$3}"}${6:, :class => "${7:form_$3}"}${8:, :disabled => ${9:false}}${10:, :disable_with => "${11:Please wait...}"} %> \ No newline at end of file diff --git a/extras/imported/rails-mode/Finders/find(3Aall).yasnippet b/extras/imported/rails-mode/Finders/find(3Aall).yasnippet new file mode 100644 index 0000000..0f2067e --- /dev/null +++ b/extras/imported/rails-mode/Finders/find(3Aall).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: fina +# contributor: Translated from TextMate Snippet +# name: find(:all) +## condition: "source.ruby.rails" +# -- +find(:all${1:, :conditions => ['${2:${3:field} = ?}', ${5:true}]}) \ No newline at end of file diff --git a/extras/imported/rails-mode/Finders/find(3Afirst).yasnippet b/extras/imported/rails-mode/Finders/find(3Afirst).yasnippet new file mode 100644 index 0000000..cc0d123 --- /dev/null +++ b/extras/imported/rails-mode/Finders/find(3Afirst).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: finf +# contributor: Translated from TextMate Snippet +# name: find(:first) +## condition: "source.ruby.rails" +# -- +find(:first${1:, :conditions => ['${2:${3:field} = ?}', ${5:true}]}) \ No newline at end of file diff --git a/extras/imported/rails-mode/Finders/find(id).yasnippet b/extras/imported/rails-mode/Finders/find(id).yasnippet new file mode 100644 index 0000000..7c15cb6 --- /dev/null +++ b/extras/imported/rails-mode/Finders/find(id).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: fini +# contributor: Translated from TextMate Snippet +# name: find(id) +## condition: "source.ruby.rails" +# -- +find(${1:id}) \ No newline at end of file diff --git a/extras/imported/rails-mode/Fixtures/3C= Fixtures_identify(3Asymbol) 3E.yasnippet b/extras/imported/rails-mode/Fixtures/3C= Fixtures_identify(3Asymbol) 3E.yasnippet new file mode 100644 index 0000000..4149933 --- /dev/null +++ b/extras/imported/rails-mode/Fixtures/3C= Fixtures_identify(3Asymbol) 3E.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: fi +# contributor: Translated from TextMate Snippet +# name: <%= Fixtures.identify(:symbol) %> +## condition: "source.yaml" +# -- +<%= Fixtures.identify(:${1:name}) %>$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Fixtures/LABEL.yasnippet b/extras/imported/rails-mode/Fixtures/LABEL.yasnippet new file mode 100644 index 0000000..b33a2ce --- /dev/null +++ b/extras/imported/rails-mode/Fixtures/LABEL.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: $L +# contributor: Translated from TextMate Snippet +# name: $LABEL +## condition: "source.yaml" +# -- +\$LABEL \ No newline at end of file diff --git a/extras/imported/rails-mode/Functional Tests/Create functional test class.yasnippet b/extras/imported/rails-mode/Functional Tests/Create functional test class.yasnippet new file mode 100644 index 0000000..1d3cf02 --- /dev/null +++ b/extras/imported/rails-mode/Functional Tests/Create functional test class.yasnippet @@ -0,0 +1,11 @@ +# -*- mode: snippet -*- +# key: cla +# contributor: Translated from TextMate Snippet +# name: Create functional test class +## condition: "source.ruby" +# -- +require File.dirname(__FILE__) + '/../test_helper' + +class ${1:Model}ControllerTest < ActionController::TestCase + deft$0 +end diff --git a/extras/imported/rails-mode/Functional Tests/Test Assert Redirected To (art).yasnippet b/extras/imported/rails-mode/Functional Tests/Test Assert Redirected To (art).yasnippet new file mode 100644 index 0000000..1cdb228 --- /dev/null +++ b/extras/imported/rails-mode/Functional Tests/Test Assert Redirected To (art).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: art +# contributor: Translated from TextMate Snippet +# name: assert_redirected_to +## condition: "source.ruby.rails" +# -- +assert_redirected_to ${2::action => "${1:index}"} \ No newline at end of file diff --git a/extras/imported/rails-mode/Functional Tests/Test Assert Response (are).yasnippet b/extras/imported/rails-mode/Functional Tests/Test Assert Response (are).yasnippet new file mode 100644 index 0000000..40683c4 --- /dev/null +++ b/extras/imported/rails-mode/Functional Tests/Test Assert Response (are).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: asre +# contributor: Translated from TextMate Snippet +# name: assert_response +## condition: "source.ruby.rails" +# -- +assert_response :${1:success}, @response.body$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Functional Tests/assert(var = assigns(3Avar)).yasnippet b/extras/imported/rails-mode/Functional Tests/assert(var = assigns(3Avar)).yasnippet new file mode 100644 index 0000000..8dd0ce1 --- /dev/null +++ b/extras/imported/rails-mode/Functional Tests/assert(var = assigns(3Avar)).yasnippet @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# key: asg +# contributor: Translated from TextMate Snippet +# name: assert(var = assigns(:var)) +## condition: "source.ruby" +# -- +assert(${1:var} = assigns(:$1), "Cannot find @$1") +$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Functional Tests/assert_redirected_to (nested path plural).yasnippet b/extras/imported/rails-mode/Functional Tests/assert_redirected_to (nested path plural).yasnippet new file mode 100644 index 0000000..4f6c477 --- /dev/null +++ b/extras/imported/rails-mode/Functional Tests/assert_redirected_to (nested path plural).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: artnpp +# contributor: Translated from TextMate Snippet +# name: assert_redirected_to (nested path plural) +## condition: "source.ruby.rails" +# -- +assert_redirected_to ${10:${2:parent}_${3:child}_path(${4:@}${5:$2})} \ No newline at end of file diff --git a/extras/imported/rails-mode/Functional Tests/assert_redirected_to (nested path).yasnippet b/extras/imported/rails-mode/Functional Tests/assert_redirected_to (nested path).yasnippet new file mode 100644 index 0000000..9a7e941 --- /dev/null +++ b/extras/imported/rails-mode/Functional Tests/assert_redirected_to (nested path).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: artnp +# contributor: Translated from TextMate Snippet +# name: assert_redirected_to (nested path) +## condition: "source.ruby.rails" +# -- +assert_redirected_to ${2:${12:parent}_${13:child}_path(${14:@}${15:$12}, ${16:@}${17:$13})} \ No newline at end of file diff --git a/extras/imported/rails-mode/Functional Tests/assert_redirected_to (path plural).yasnippet b/extras/imported/rails-mode/Functional Tests/assert_redirected_to (path plural).yasnippet new file mode 100644 index 0000000..dd9e122 --- /dev/null +++ b/extras/imported/rails-mode/Functional Tests/assert_redirected_to (path plural).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: artpp +# contributor: Translated from TextMate Snippet +# name: assert_redirected_to (path plural) +## condition: "source.ruby.rails" +# -- +assert_redirected_to ${10:${2:model}s_path} \ No newline at end of file diff --git a/extras/imported/rails-mode/Functional Tests/assert_redirected_to (path).yasnippet b/extras/imported/rails-mode/Functional Tests/assert_redirected_to (path).yasnippet new file mode 100644 index 0000000..a17c8a8 --- /dev/null +++ b/extras/imported/rails-mode/Functional Tests/assert_redirected_to (path).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: artp +# contributor: Translated from TextMate Snippet +# name: assert_redirected_to (path) +## condition: "source.ruby.rails" +# -- +assert_redirected_to ${2:${12:model}_path(${13:@}${14:$12})} \ No newline at end of file diff --git a/extras/imported/rails-mode/Functional Tests/assert_rjs.yasnippet b/extras/imported/rails-mode/Functional Tests/assert_rjs.yasnippet new file mode 100644 index 0000000..f39608d --- /dev/null +++ b/extras/imported/rails-mode/Functional Tests/assert_rjs.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: asrj +# contributor: Translated from TextMate Snippet +# name: assert_rjs +## condition: "source.ruby.rails" +# -- +assert_rjs :${1:replace}, ${2:"${3:dom id}"} \ No newline at end of file diff --git a/extras/imported/rails-mode/Functional Tests/assert_select.yasnippet b/extras/imported/rails-mode/Functional Tests/assert_select.yasnippet new file mode 100644 index 0000000..75fbc8b --- /dev/null +++ b/extras/imported/rails-mode/Functional Tests/assert_select.yasnippet @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# key: ass +# contributor: Translated from TextMate Snippet +# name: assert_select +## condition: "source.ruby.rails" +# -- +assert_select '${1:path}'${2:, :${3:text} => ${4:'${5:inner_html}'}}${6: do + $0 +end} \ No newline at end of file diff --git a/extras/imported/rails-mode/Functional Tests/def get request.yasnippet b/extras/imported/rails-mode/Functional Tests/def get request.yasnippet new file mode 100644 index 0000000..4393067 --- /dev/null +++ b/extras/imported/rails-mode/Functional Tests/def get request.yasnippet @@ -0,0 +1,12 @@ +# -*- mode: snippet -*- +# key: deftg +# contributor: Translated from TextMate Snippet +# name: def test_should_get_action +## condition: "meta.rails.functional_test" +# -- +def test_should_get_${1:action} + ${2:@${3:model} = ${4:$3s}(:${5:fixture_name}) + }get :${1}${6:, :id => @$3.to_param} + assert_response :success + $0 +end \ No newline at end of file diff --git a/extras/imported/rails-mode/Functional Tests/def post request.yasnippet b/extras/imported/rails-mode/Functional Tests/def post request.yasnippet new file mode 100644 index 0000000..7546354 --- /dev/null +++ b/extras/imported/rails-mode/Functional Tests/def post request.yasnippet @@ -0,0 +1,12 @@ +# -*- mode: snippet -*- +# key: deftp +# contributor: Translated from TextMate Snippet +# name: def test_should_post_action +## condition: "meta.rails.functional_test" +# -- +def test_should_post_${1:action} + ${3:@$2 = ${4:$2s}(:${5:fixture_name}) + }post :${1}${6:, :id => @$2.to_param}, :${2:model} => { $0 } + assert_response :redirect + +end \ No newline at end of file diff --git a/extras/imported/rails-mode/Generate.yasnippet b/extras/imported/rails-mode/Generate.yasnippet new file mode 100644 index 0000000..0cc0a14 --- /dev/null +++ b/extras/imported/rails-mode/Generate.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# type: command +# contributor: Translated from TextMate Snippet +# name: Call Generate Script +## binding: "^|" +## condition: "source.ruby.rails, source.yaml" +# -- diff --git a/extras/imported/rails-mode/Go To/Go To Alternate File.yasnippet b/extras/imported/rails-mode/Go To/Go To Alternate File.yasnippet new file mode 100644 index 0000000..ca656b1 --- /dev/null +++ b/extras/imported/rails-mode/Go To/Go To Alternate File.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# type: command +# contributor: Translated from TextMate Snippet +# name: Go to Controller +## binding: "~$@" +## condition: "text.html.ruby, source.ruby.rails.embedded.html, meta.rails.helper, meta.rails.functional_test, source.js, source.css, source.yaml, meta.rails.model, meta.rails.unit_test, text.haml" +# -- diff --git a/extras/imported/rails-mode/Go To/Go To File on This Line.yasnippet b/extras/imported/rails-mode/Go To/Go To File on This Line.yasnippet new file mode 100644 index 0000000..744f0e0 --- /dev/null +++ b/extras/imported/rails-mode/Go To/Go To File on This Line.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# type: command +# contributor: Translated from TextMate Snippet +# name: File on Current Line +## binding: "~@" +## condition: "source.ruby.rails, text.html.ruby, source.ruby.rails.embedded.html, text.haml" +# -- diff --git a/extras/imported/rails-mode/Go To/Go To File.yasnippet b/extras/imported/rails-mode/Go To/Go To File.yasnippet new file mode 100644 index 0000000..0218ee8 --- /dev/null +++ b/extras/imported/rails-mode/Go To/Go To File.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# type: command +# contributor: Translated from TextMate Snippet +# name: Alternate File +## binding: "~@" +## condition: "source.ruby.rails, text.html.ruby, source.ruby.rails.embedded.html, source.yaml, text.haml, source.css, source.js, source.sass" +# -- diff --git a/extras/imported/rails-mode/Go To/Go To Functional Test.yasnippet b/extras/imported/rails-mode/Go To/Go To Functional Test.yasnippet new file mode 100644 index 0000000..20ffe9e --- /dev/null +++ b/extras/imported/rails-mode/Go To/Go To Functional Test.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# type: command +# contributor: Translated from TextMate Snippet +# name: Go to Functional Test +## binding: "~$@" +## condition: "meta.rails.controller, meta.rails.helper, meta.rails.model, source.yaml, meta.rails.unit_test" +# -- diff --git a/extras/imported/rails-mode/Go To/Go To Helper.yasnippet b/extras/imported/rails-mode/Go To/Go To Helper.yasnippet new file mode 100644 index 0000000..29cf26c --- /dev/null +++ b/extras/imported/rails-mode/Go To/Go To Helper.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# type: command +# contributor: Translated from TextMate Snippet +# name: Go to Helper +## binding: "~$@" +## condition: "text.html.ruby, source.ruby.rails.embedded.html, meta.rails.controller, meta.rails.model, meta.rails.unit_test, meta.rails.functional_test, text.haml" +# -- diff --git a/extras/imported/rails-mode/Go To/Go To Javascript.yasnippet b/extras/imported/rails-mode/Go To/Go To Javascript.yasnippet new file mode 100644 index 0000000..a712768 --- /dev/null +++ b/extras/imported/rails-mode/Go To/Go To Javascript.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# type: command +# contributor: Translated from TextMate Snippet +# name: Go to Javascript +## binding: "~$@" +## condition: "text.html.ruby, source.ruby.rails.embedded.html, meta.rails.controller, meta.rails.helper, text.haml" +# -- diff --git a/extras/imported/rails-mode/Go To/Go To Stylesheet.yasnippet b/extras/imported/rails-mode/Go To/Go To Stylesheet.yasnippet new file mode 100644 index 0000000..1c25cce --- /dev/null +++ b/extras/imported/rails-mode/Go To/Go To Stylesheet.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# type: command +# contributor: Translated from TextMate Snippet +# name: Go to Stylesheet +## binding: "~$@" +## condition: "text.html.ruby, source.ruby.rails.embedded.html, meta.rails.controller, meta.rails.helper, text.haml" +# -- diff --git a/extras/imported/rails-mode/Go To/Go To Unit Test.yasnippet b/extras/imported/rails-mode/Go To/Go To Unit Test.yasnippet new file mode 100644 index 0000000..7bec029 --- /dev/null +++ b/extras/imported/rails-mode/Go To/Go To Unit Test.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# type: command +# contributor: Translated from TextMate Snippet +# name: Go to Unit Test +## binding: "~$@" +## condition: "meta.rails.controller, meta.rails.helper, meta.rails.model, meta.rails.functional_test, source.yaml" +# -- diff --git a/extras/imported/rails-mode/Go To/Go To View.yasnippet b/extras/imported/rails-mode/Go To/Go To View.yasnippet new file mode 100644 index 0000000..4d1255a --- /dev/null +++ b/extras/imported/rails-mode/Go To/Go To View.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# type: command +# contributor: Translated from TextMate Snippet +# name: Go to View +## binding: "~$@" +## condition: "meta.rails.controller, meta.rails.mailer, source.js, source.css" +# -- diff --git a/extras/imported/rails-mode/Install Bundled Plugin.yasnippet b/extras/imported/rails-mode/Install Bundled Plugin.yasnippet new file mode 100644 index 0000000..5787759 --- /dev/null +++ b/extras/imported/rails-mode/Install Bundled Plugin.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# type: command +# contributor: Translated from TextMate Snippet +# name: Install Plugin +## binding: "^|" +## condition: "source.ruby.rails, source.yaml" +# -- diff --git a/extras/imported/rails-mode/Layouts/javascript_include_tag.yasnippet b/extras/imported/rails-mode/Layouts/javascript_include_tag.yasnippet new file mode 100644 index 0000000..7816863 --- /dev/null +++ b/extras/imported/rails-mode/Layouts/javascript_include_tag.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: jit +# contributor: Translated from TextMate Snippet +# name: javascript_include_tag +## condition: "text.html.ruby" +# -- +<%= javascript_include_tag ${1::all}${2:, :cache => ${3:true}} %> \ No newline at end of file diff --git a/extras/imported/rails-mode/Layouts/stylesheet_link_tag.yasnippet b/extras/imported/rails-mode/Layouts/stylesheet_link_tag.yasnippet new file mode 100644 index 0000000..75bc982 --- /dev/null +++ b/extras/imported/rails-mode/Layouts/stylesheet_link_tag.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: slt +# contributor: Translated from TextMate Snippet +# name: stylesheet_link_tag +## condition: "text.html.ruby" +# -- +<%= stylesheet_link_tag ${1::all}${2:, :cache => ${3:true}} %> \ No newline at end of file diff --git a/extras/imported/rails-mode/Logger/RAILS_DEFAULT_LOGGER.debug (rdb).yasnippet b/extras/imported/rails-mode/Logger/RAILS_DEFAULT_LOGGER.debug (rdb).yasnippet new file mode 100644 index 0000000..a02e9fb --- /dev/null +++ b/extras/imported/rails-mode/Logger/RAILS_DEFAULT_LOGGER.debug (rdb).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: rdb +# contributor: Translated from TextMate Snippet +# name: RAILS_DEFAULT_LOGGER.debug +## condition: "source.ruby.rails" +# -- +RAILS_DEFAULT_LOGGER.debug "${1:message}"$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Logger/logger_debug.yasnippet b/extras/imported/rails-mode/Logger/logger_debug.yasnippet new file mode 100644 index 0000000..10a9227 --- /dev/null +++ b/extras/imported/rails-mode/Logger/logger_debug.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: logd +# contributor: Translated from TextMate Snippet +# name: logger.debug +## condition: "source.ruby.rails" +# -- +logger.debug { "${1:message}" }$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Logger/logger_error.yasnippet b/extras/imported/rails-mode/Logger/logger_error.yasnippet new file mode 100644 index 0000000..ef75c56 --- /dev/null +++ b/extras/imported/rails-mode/Logger/logger_error.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: loge +# contributor: Translated from TextMate Snippet +# name: logger.error +## condition: "source.ruby.rails" +# -- +logger.error { "${1:message}" }$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Logger/logger_fatal.yasnippet b/extras/imported/rails-mode/Logger/logger_fatal.yasnippet new file mode 100644 index 0000000..0ec95d5 --- /dev/null +++ b/extras/imported/rails-mode/Logger/logger_fatal.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: logf +# contributor: Translated from TextMate Snippet +# name: logger.fatal +## condition: "source.ruby.rails" +# -- +logger.fatal { "${1:message}" }$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Logger/logger_info.yasnippet b/extras/imported/rails-mode/Logger/logger_info.yasnippet new file mode 100644 index 0000000..916639e --- /dev/null +++ b/extras/imported/rails-mode/Logger/logger_info.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: logi +# contributor: Translated from TextMate Snippet +# name: logger.info +## condition: "source.ruby.rails" +# -- +logger.info { "${1:message}" }$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Logger/logger_warn.yasnippet b/extras/imported/rails-mode/Logger/logger_warn.yasnippet new file mode 100644 index 0000000..462df84 --- /dev/null +++ b/extras/imported/rails-mode/Logger/logger_warn.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: logw +# contributor: Translated from TextMate Snippet +# name: logger.warn +## condition: "source.ruby.rails" +# -- +logger.warn { "${1:message}" }$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/REST methods/def create - resource.yasnippet b/extras/imported/rails-mode/REST methods/def create - resource.yasnippet new file mode 100644 index 0000000..cef3a37 --- /dev/null +++ b/extras/imported/rails-mode/REST methods/def create - resource.yasnippet @@ -0,0 +1,20 @@ +# -*- mode: snippet -*- +# key: defcreate +# contributor: Translated from TextMate Snippet +# name: def create - resource +## condition: "meta.rails.controller" +# -- +def create + @${1:model} = ${2:${1:$(replace-regexp-in-string "_" "" (capitalize yas/text))}}.new(params[:$1]) + $0 + respond_to do |wants| + if @$1.save + flash[:notice] = '$2 was successfully created.' + wants.html { redirect_to(@$1) } + wants.xml { render :xml => @$1, :status => :created, :location => @$1 } + else + wants.html { render :action => "new" } + wants.xml { render :xml => @$1.errors, :status => :unprocessable_entity } + end + end +end diff --git a/extras/imported/rails-mode/RJS/page_hide (2Aids).yasnippet b/extras/imported/rails-mode/RJS/page_hide (2Aids).yasnippet new file mode 100644 index 0000000..450d559 --- /dev/null +++ b/extras/imported/rails-mode/RJS/page_hide (2Aids).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: hide +# contributor: Translated from TextMate Snippet +# name: page.hide (*ids) +## condition: "source.ruby.rails.rjs" +# -- +page.hide ${1:"${2:id(s)}"} \ No newline at end of file diff --git a/extras/imported/rails-mode/RJS/page_insert_html (position, id, partial).yasnippet b/extras/imported/rails-mode/RJS/page_insert_html (position, id, partial).yasnippet new file mode 100644 index 0000000..0294851 --- /dev/null +++ b/extras/imported/rails-mode/RJS/page_insert_html (position, id, partial).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: ins +# contributor: Translated from TextMate Snippet +# name: page.insert_html (position, id, partial) +## condition: "source.ruby.rails.rjs" +# -- +page.insert_html :${1:top}, ${2:"${3:id}"}, :${4:partial => "${5:template}"} \ No newline at end of file diff --git a/extras/imported/rails-mode/RJS/page_replace (id, partial).yasnippet b/extras/imported/rails-mode/RJS/page_replace (id, partial).yasnippet new file mode 100644 index 0000000..73d1046 --- /dev/null +++ b/extras/imported/rails-mode/RJS/page_replace (id, partial).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: rep +# contributor: Translated from TextMate Snippet +# name: page.replace (id, partial) +## condition: "source.ruby.rails.rjs" +# -- +page.replace ${1:"${2:id}"}, :${3:partial => "${4:template}"} \ No newline at end of file diff --git a/extras/imported/rails-mode/RJS/page_replace_html (id, partial).yasnippet b/extras/imported/rails-mode/RJS/page_replace_html (id, partial).yasnippet new file mode 100644 index 0000000..65a7619 --- /dev/null +++ b/extras/imported/rails-mode/RJS/page_replace_html (id, partial).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: reph +# contributor: Translated from TextMate Snippet +# name: page.replace_html (id, partial) +## condition: "source.ruby.rails.rjs" +# -- +page.replace_html ${1:"${2:id}"}, :${3:partial => "${4:template}"} \ No newline at end of file diff --git a/extras/imported/rails-mode/RJS/page_show (2Aids).yasnippet b/extras/imported/rails-mode/RJS/page_show (2Aids).yasnippet new file mode 100644 index 0000000..091cc68 --- /dev/null +++ b/extras/imported/rails-mode/RJS/page_show (2Aids).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: show +# contributor: Translated from TextMate Snippet +# name: page.show (*ids) +## condition: "source.ruby.rails.rjs" +# -- +page.show ${1:"${2:id(s)}"} \ No newline at end of file diff --git a/extras/imported/rails-mode/RJS/page_toggle (2Aids).yasnippet b/extras/imported/rails-mode/RJS/page_toggle (2Aids).yasnippet new file mode 100644 index 0000000..9f259db --- /dev/null +++ b/extras/imported/rails-mode/RJS/page_toggle (2Aids).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: tog +# contributor: Translated from TextMate Snippet +# name: page.toggle (*ids) +## condition: "source.ruby.rails.rjs" +# -- +page.toggle ${1:"${2:id(s)}"} \ No newline at end of file diff --git a/extras/imported/rails-mode/RJS/page_visual_effect (effect, id).yasnippet b/extras/imported/rails-mode/RJS/page_visual_effect (effect, id).yasnippet new file mode 100644 index 0000000..60eb837 --- /dev/null +++ b/extras/imported/rails-mode/RJS/page_visual_effect (effect, id).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: vis +# contributor: Translated from TextMate Snippet +# name: page.visual_effect (effect, id) +## condition: "source.ruby.rails.rjs" +# -- +page.visual_effect :${1:toggle_slide}, ${2:"${3:DOM ID}"} \ No newline at end of file diff --git a/extras/imported/rails-mode/Routes/map_catch_all.yasnippet b/extras/imported/rails-mode/Routes/map_catch_all.yasnippet new file mode 100644 index 0000000..bc77bb7 --- /dev/null +++ b/extras/imported/rails-mode/Routes/map_catch_all.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: mapca +# contributor: Translated from TextMate Snippet +# name: map.catch_all +## condition: "meta.rails.routes" +# -- +${1:map}.catch_all "*${2:anything}", :controller => "${3:default}", :action => "${4:error}" diff --git a/extras/imported/rails-mode/Routes/map_named_route.yasnippet b/extras/imported/rails-mode/Routes/map_named_route.yasnippet new file mode 100644 index 0000000..15d04ab --- /dev/null +++ b/extras/imported/rails-mode/Routes/map_named_route.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: map +# contributor: Translated from TextMate Snippet +# name: map.named_route +## condition: "meta.rails.routes" +# -- +${1:map}.${2:connect} '${3::controller/:action/:id}' \ No newline at end of file diff --git a/extras/imported/rails-mode/Routes/map_resource.yasnippet b/extras/imported/rails-mode/Routes/map_resource.yasnippet new file mode 100644 index 0000000..b871152 --- /dev/null +++ b/extras/imported/rails-mode/Routes/map_resource.yasnippet @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# key: mapr +# contributor: Translated from TextMate Snippet +# name: map.resource +## condition: "meta.rails.routes" +# -- +${1:map}.resource :${2:resource}${10: do |${11:$2}| + $0 +end} \ No newline at end of file diff --git a/extras/imported/rails-mode/Routes/map_resources.yasnippet b/extras/imported/rails-mode/Routes/map_resources.yasnippet new file mode 100644 index 0000000..5d4a73e --- /dev/null +++ b/extras/imported/rails-mode/Routes/map_resources.yasnippet @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# key: maprs +# contributor: Translated from TextMate Snippet +# name: map.resources +## condition: "meta.rails.routes" +# -- +${1:map}.resources :${2:resource}${10: do |${11:$2}| + # mirror for $11 + $0 +end} \ No newline at end of file diff --git a/extras/imported/rails-mode/Routes/map_with_options.yasnippet b/extras/imported/rails-mode/Routes/map_with_options.yasnippet new file mode 100644 index 0000000..e54a1fb --- /dev/null +++ b/extras/imported/rails-mode/Routes/map_with_options.yasnippet @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# key: mapwo +# contributor: Translated from TextMate Snippet +# name: map.with_options +## condition: "meta.rails.routes" +# -- +${1:map}.with_options :${2:controller} => '${3:thing}' do |${4:$3}| + $0 +end diff --git a/extras/imported/rails-mode/Scopes/named_scope lambda.yasnippet b/extras/imported/rails-mode/Scopes/named_scope lambda.yasnippet new file mode 100644 index 0000000..3d268a5 --- /dev/null +++ b/extras/imported/rails-mode/Scopes/named_scope lambda.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: ncl +# contributor: Translated from TextMate Snippet +# name: named_scope lambda +## condition: "source.ruby.rails" +# -- +named_scope :name, lambda { |${1:param}| { :conditions => ${3:['${4:${5:field} = ?}', ${6:$1}]} } } diff --git a/extras/imported/rails-mode/Scopes/named_scope.yasnippet b/extras/imported/rails-mode/Scopes/named_scope.yasnippet new file mode 100644 index 0000000..50b7418 --- /dev/null +++ b/extras/imported/rails-mode/Scopes/named_scope.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: nc +# contributor: Translated from TextMate Snippet +# name: named_scope +## condition: "source.ruby.rails" +# -- +named_scope :name${1:, :joins => :${2:table}}, :conditions => ${3:['${4:${5:field} = ?}', ${6:true}]} diff --git a/extras/imported/rails-mode/Tables/Migration Create Column (mcc).yasnippet b/extras/imported/rails-mode/Tables/Migration Create Column (mcc).yasnippet new file mode 100644 index 0000000..289bcc8 --- /dev/null +++ b/extras/imported/rails-mode/Tables/Migration Create Column (mcc).yasnippet @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# key: mcol +# contributor: Translated from TextMate Snippet +# name: Create Column in Table +## condition: "meta.rails.migration.create_table" +# -- +t.column ${1:title}, :${2:string} +$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Tables/Migration Create Column Continue (mccc).yasnippet b/extras/imported/rails-mode/Tables/Migration Create Column Continue (mccc).yasnippet new file mode 100644 index 0000000..d7374fe --- /dev/null +++ b/extras/imported/rails-mode/Tables/Migration Create Column Continue (mccc).yasnippet @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# key: mccc +# contributor: Translated from TextMate Snippet +# name: Create Several Columns in Table +## condition: "meta.rails.migration.create_table" +# -- +t.column ${1:title}, :${2:string} +mccc$0 \ No newline at end of file diff --git a/extras/imported/rails-mode/Tables/Migration Drop Create Table (mdct).yasnippet b/extras/imported/rails-mode/Tables/Migration Drop Create Table (mdct).yasnippet new file mode 100644 index 0000000..abe99dc --- /dev/null +++ b/extras/imported/rails-mode/Tables/Migration Drop Create Table (mdct).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: mtab +# contributor: Translated from TextMate Snippet +# name: Drop / Create Table +## condition: "meta.rails.migration - meta.rails.migration.create_table - meta.rails.migration.change_table" +# -- +drop_table :${1:table}${2: [press tab twice to generate create_table]} \ No newline at end of file diff --git a/extras/imported/rails-mode/Unit Tests/assert_difference.yasnippet b/extras/imported/rails-mode/Unit Tests/assert_difference.yasnippet new file mode 100644 index 0000000..7ccb254 --- /dev/null +++ b/extras/imported/rails-mode/Unit Tests/assert_difference.yasnippet @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# key: asd +# contributor: Translated from TextMate Snippet +# name: assert_difference +## condition: "source.ruby" +# -- +assert_difference "${1:Model}.${2:count}", ${3:1} do + $0 +end \ No newline at end of file diff --git a/extras/imported/rails-mode/Unit Tests/assert_no_difference.yasnippet b/extras/imported/rails-mode/Unit Tests/assert_no_difference.yasnippet new file mode 100644 index 0000000..0d670b6 --- /dev/null +++ b/extras/imported/rails-mode/Unit Tests/assert_no_difference.yasnippet @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# key: asnd +# contributor: Translated from TextMate Snippet +# name: assert_no_difference +## condition: "source.ruby" +# -- +assert_no_difference "${1:Model}.${2:count}" do + $0 +end \ No newline at end of file diff --git a/extras/imported/rails-mode/Validations/validates_acceptance_of if.yasnippet b/extras/imported/rails-mode/Validations/validates_acceptance_of if.yasnippet new file mode 100644 index 0000000..0b30fb9 --- /dev/null +++ b/extras/imported/rails-mode/Validations/validates_acceptance_of if.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: vaoif +# contributor: Translated from TextMate Snippet +# name: validates_acceptance_of if +## condition: "source.ruby.rails" +# -- +validates_acceptance_of :${1:terms}${2:${3:, :accept => "${4:1}"}${5:, :message => "${6:You must accept the terms of service}"}}, :if => proc { |obj| ${7:obj.condition?} } \ No newline at end of file diff --git a/extras/imported/rails-mode/Validations/validates_acceptance_of.yasnippet b/extras/imported/rails-mode/Validations/validates_acceptance_of.yasnippet new file mode 100644 index 0000000..59ce3ca --- /dev/null +++ b/extras/imported/rails-mode/Validations/validates_acceptance_of.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: vao +# contributor: Translated from TextMate Snippet +# name: validates_acceptance_of +## condition: "source.ruby.rails" +# -- +validates_acceptance_of :${1:terms}${2:${3:, :accept => "${4:1}"}${5:, :message => "${6:You must accept the terms of service}"}} \ No newline at end of file diff --git a/extras/imported/rails-mode/Validations/validates_associated (va).yasnippet b/extras/imported/rails-mode/Validations/validates_associated (va).yasnippet new file mode 100644 index 0000000..ae71405 --- /dev/null +++ b/extras/imported/rails-mode/Validations/validates_associated (va).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: va +# contributor: Translated from TextMate Snippet +# name: validates_associated +## condition: "source.ruby.rails" +# -- +validates_associated :${1:attribute}${2:, :on => :${3:create}} \ No newline at end of file diff --git a/extras/imported/rails-mode/Validations/validates_associated if (vaif).yasnippet b/extras/imported/rails-mode/Validations/validates_associated if (vaif).yasnippet new file mode 100644 index 0000000..9a8d51d --- /dev/null +++ b/extras/imported/rails-mode/Validations/validates_associated if (vaif).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: vaif +# contributor: Translated from TextMate Snippet +# name: validates_associated if +## condition: "source.ruby.rails" +# -- +validates_associated :${1:attribute}${2:, :on => :${3:create}, :if => proc { |obj| ${5:obj.condition?} }} \ No newline at end of file diff --git a/extras/imported/rails-mode/Validations/validates_confirmation_of (vc).yasnippet b/extras/imported/rails-mode/Validations/validates_confirmation_of (vc).yasnippet new file mode 100644 index 0000000..c5a408b --- /dev/null +++ b/extras/imported/rails-mode/Validations/validates_confirmation_of (vc).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: vc +# contributor: Translated from TextMate Snippet +# name: validates_confirmation_of +## condition: "source.ruby.rails" +# -- +validates_confirmation_of :${1:attribute}${2:, :on => :${3:create}, :message => "${4:should match confirmation}"} \ No newline at end of file diff --git a/extras/imported/rails-mode/Validations/validates_confirmation_of if (vcif).yasnippet b/extras/imported/rails-mode/Validations/validates_confirmation_of if (vcif).yasnippet new file mode 100644 index 0000000..d173ade --- /dev/null +++ b/extras/imported/rails-mode/Validations/validates_confirmation_of if (vcif).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: vcif +# contributor: Translated from TextMate Snippet +# name: validates_confirmation_of if +## condition: "source.ruby.rails" +# -- +validates_confirmation_of :${1:attribute}${2:, :on => :${3:create}, :message => "${4:should match confirmation}", :if => proc { |obj| ${5:obj.condition?} }} \ No newline at end of file diff --git a/extras/imported/rails-mode/Validations/validates_exclusion_of (ve).yasnippet b/extras/imported/rails-mode/Validations/validates_exclusion_of (ve).yasnippet new file mode 100644 index 0000000..ca22707 --- /dev/null +++ b/extras/imported/rails-mode/Validations/validates_exclusion_of (ve).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: ve +# contributor: Translated from TextMate Snippet +# name: validates_exclusion_of +## condition: "source.ruby.rails" +# -- +validates_exclusion_of :${1:attribute}${2:, :in => ${3:%w( ${4:mov avi} )}, :on => :${5:create}, :message => "${6:extension %s is not allowed}"} \ No newline at end of file diff --git a/extras/imported/rails-mode/Validations/validates_exclusion_of if (veif).yasnippet b/extras/imported/rails-mode/Validations/validates_exclusion_of if (veif).yasnippet new file mode 100644 index 0000000..181eebe --- /dev/null +++ b/extras/imported/rails-mode/Validations/validates_exclusion_of if (veif).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: veif +# contributor: Translated from TextMate Snippet +# name: validates_exclusion_of if +## condition: "source.ruby.rails" +# -- +validates_exclusion_of :${1:attribute}${2:, :in => ${3:%w( ${4:mov avi} )}, :on => :${5:create}, :message => "${6:extension %s is not allowed}"}, :if => proc { |obj| ${7:obj.condition?} } \ No newline at end of file diff --git a/extras/imported/rails-mode/Validations/validates_format_of if.yasnippet b/extras/imported/rails-mode/Validations/validates_format_of if.yasnippet new file mode 100644 index 0000000..eb79828 --- /dev/null +++ b/extras/imported/rails-mode/Validations/validates_format_of if.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: vfif +# contributor: Translated from TextMate Snippet +# name: validates_format_of if +## condition: "source.ruby.rails" +# -- +validates_format_of :${1:attribute}, :with => /${2:^[${3:\w\d}]+\$}/${4:, :on => :${5:create}, :message => "${6:is invalid}"}, :if => proc { |obj| ${7:obj.condition?} } \ No newline at end of file diff --git a/extras/imported/rails-mode/Validations/validates_format_of.yasnippet b/extras/imported/rails-mode/Validations/validates_format_of.yasnippet new file mode 100644 index 0000000..234f5a0 --- /dev/null +++ b/extras/imported/rails-mode/Validations/validates_format_of.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: vf +# contributor: Translated from TextMate Snippet +# name: validates_format_of +## condition: "source.ruby.rails" +# -- +validates_format_of :${1:attribute}, :with => /${2:^[${3:\w\d}]+\$}/${4:, :on => :${5:create}, :message => "${6:is invalid}"} \ No newline at end of file diff --git a/extras/imported/rails-mode/Validations/validates_inclusion_of if.yasnippet b/extras/imported/rails-mode/Validations/validates_inclusion_of if.yasnippet new file mode 100644 index 0000000..9e4b416 --- /dev/null +++ b/extras/imported/rails-mode/Validations/validates_inclusion_of if.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: viif +# contributor: Translated from TextMate Snippet +# name: validates_inclusion_of if +## condition: "source.ruby.rails" +# -- +validates_inclusion_of :${1:attribute}${2:, :in => ${3:%w( ${4:mov avi} )}, :on => :${5:create}, :message => "${6:extension %s is not included in the list}"}, :if => proc { |obj| ${7:obj.condition?} } \ No newline at end of file diff --git a/extras/imported/rails-mode/Validations/validates_inclusion_of.yasnippet b/extras/imported/rails-mode/Validations/validates_inclusion_of.yasnippet new file mode 100644 index 0000000..7f95c0e --- /dev/null +++ b/extras/imported/rails-mode/Validations/validates_inclusion_of.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: vi +# contributor: Translated from TextMate Snippet +# name: validates_inclusion_of +## condition: "source.ruby.rails" +# -- +validates_inclusion_of :${1:attribute}${2:, :in => ${3:%w( ${4:mov avi} )}, :on => :${5:create}, :message => "${6:extension %s is not included in the list}"} \ No newline at end of file diff --git a/extras/imported/rails-mode/Validations/validates_length_of (vl).yasnippet b/extras/imported/rails-mode/Validations/validates_length_of (vl).yasnippet new file mode 100644 index 0000000..44c1a31 --- /dev/null +++ b/extras/imported/rails-mode/Validations/validates_length_of (vl).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: vl +# contributor: Translated from TextMate Snippet +# name: validates_length_of +## condition: "source.ruby.rails" +# -- +validates_length_of :${1:attribute}, :within => ${2:3..20}${3:, :on => :${4:create}, :message => "${5:must be present}"} \ No newline at end of file diff --git a/extras/imported/rails-mode/Validations/validates_length_of if.yasnippet b/extras/imported/rails-mode/Validations/validates_length_of if.yasnippet new file mode 100644 index 0000000..a821219 --- /dev/null +++ b/extras/imported/rails-mode/Validations/validates_length_of if.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: vlif +# contributor: Translated from TextMate Snippet +# name: validates_length_of if +## condition: "source.ruby.rails" +# -- +validates_length_of :${1:attribute}, :within => ${2:3..20}${3:, :on => :${4:create}, :message => "${5:must be present}"}, :if => proc { |obj| ${6:obj.condition?} } \ No newline at end of file diff --git a/extras/imported/rails-mode/Validations/validates_numericality_of if.yasnippet b/extras/imported/rails-mode/Validations/validates_numericality_of if.yasnippet new file mode 100644 index 0000000..d2794f0 --- /dev/null +++ b/extras/imported/rails-mode/Validations/validates_numericality_of if.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: vnif +# contributor: Translated from TextMate Snippet +# name: validates_numericality_of if +## condition: "source.ruby.rails" +# -- +validates_numericality_of :${1:attribute}${2:, :on => :${3:create}, :message => "${4:is not a number}"}, :if => proc { |obj| ${5:obj.condition?} }} \ No newline at end of file diff --git a/extras/imported/rails-mode/Validations/validates_numericality_of.yasnippet b/extras/imported/rails-mode/Validations/validates_numericality_of.yasnippet new file mode 100644 index 0000000..402d0ae --- /dev/null +++ b/extras/imported/rails-mode/Validations/validates_numericality_of.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: vn +# contributor: Translated from TextMate Snippet +# name: validates_numericality_of +## condition: "source.ruby.rails" +# -- +validates_numericality_of :${1:attribute}${2:, :on => :${3:create}, :message => "${4:is not a number}"} \ No newline at end of file diff --git a/extras/imported/rails-mode/Validations/validates_presence_of (vp).yasnippet b/extras/imported/rails-mode/Validations/validates_presence_of (vp).yasnippet new file mode 100644 index 0000000..038ccce --- /dev/null +++ b/extras/imported/rails-mode/Validations/validates_presence_of (vp).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: vp +# contributor: Translated from TextMate Snippet +# name: validates_presence_of +## condition: "source.ruby.rails" +# -- +validates_presence_of :${1:attribute}${2:, :on => :${3:create}, :message => "${4:can't be blank}"} \ No newline at end of file diff --git a/extras/imported/rails-mode/Validations/validates_presence_of if (vpif) 2.yasnippet b/extras/imported/rails-mode/Validations/validates_presence_of if (vpif) 2.yasnippet new file mode 100644 index 0000000..0b58278 --- /dev/null +++ b/extras/imported/rails-mode/Validations/validates_presence_of if (vpif) 2.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: vpif +# contributor: Translated from TextMate Snippet +# name: validates_presence_of if +## condition: "source.ruby.rails" +# -- +validates_presence_of :${1:attribute}${2:, :on => :${3:create}, :message => "${4:can't be blank}"}, :if => proc { |obj| ${5:obj.condition?} } \ No newline at end of file diff --git a/extras/imported/rails-mode/Validations/validates_uniqueness_of (vu).yasnippet b/extras/imported/rails-mode/Validations/validates_uniqueness_of (vu).yasnippet new file mode 100644 index 0000000..3b3fc9b --- /dev/null +++ b/extras/imported/rails-mode/Validations/validates_uniqueness_of (vu).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: vu +# contributor: Translated from TextMate Snippet +# name: validates_uniqueness_of +## condition: "source.ruby.rails" +# -- +validates_uniqueness_of :${1:attribute}${2:, :on => :${3:create}, :message => "${4:must be unique}"} \ No newline at end of file diff --git a/extras/imported/rails-mode/Validations/validates_uniqueness_of if (vuif).yasnippet b/extras/imported/rails-mode/Validations/validates_uniqueness_of if (vuif).yasnippet new file mode 100644 index 0000000..21e293f --- /dev/null +++ b/extras/imported/rails-mode/Validations/validates_uniqueness_of if (vuif).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: vuif +# contributor: Translated from TextMate Snippet +# name: validates_uniqueness_of if +## condition: "source.ruby.rails" +# -- +validates_uniqueness_of :${1:attribute}${2:, :on => :${3:create}, :message => "${4:must be unique}", :if => proc { |obj| ${6:obj.condition?} }} \ No newline at end of file diff --git a/extras/imported/rails-mode/form_for f. drop-down list/form_for checkbox.yasnippet b/extras/imported/rails-mode/form_for f. drop-down list/form_for checkbox.yasnippet new file mode 100644 index 0000000..f7bbb1f --- /dev/null +++ b/extras/imported/rails-mode/form_for f. drop-down list/form_for checkbox.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: f. +# contributor: Translated from TextMate Snippet +# name: f.check_box (ffcb) +## condition: "text.html.ruby, text.haml" +# -- +<%= f.check_box :${1:attribute} %> \ No newline at end of file diff --git a/extras/imported/rails-mode/form_for f. drop-down list/form_for file_field.yasnippet b/extras/imported/rails-mode/form_for f. drop-down list/form_for file_field.yasnippet new file mode 100644 index 0000000..86a334f --- /dev/null +++ b/extras/imported/rails-mode/form_for f. drop-down list/form_for file_field.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: f. +# contributor: Translated from TextMate Snippet +# name: f.file_field (ffff) +## condition: "text.html.ruby, text.haml" +# -- +<%= f.file_field :${1:attribute} %> \ No newline at end of file diff --git a/extras/imported/rails-mode/form_for f. drop-down list/form_for hidden_field.yasnippet b/extras/imported/rails-mode/form_for f. drop-down list/form_for hidden_field.yasnippet new file mode 100644 index 0000000..827bc26 --- /dev/null +++ b/extras/imported/rails-mode/form_for f. drop-down list/form_for hidden_field.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: f. +# contributor: Translated from TextMate Snippet +# name: f.hidden_field (ffhf) +## condition: "text.html.ruby, text.haml" +# -- +<%= f.hidden_field :${1:attribute} %> \ No newline at end of file diff --git a/extras/imported/rails-mode/form_for f. drop-down list/form_for label.yasnippet b/extras/imported/rails-mode/form_for f. drop-down list/form_for label.yasnippet new file mode 100644 index 0000000..b4c468b --- /dev/null +++ b/extras/imported/rails-mode/form_for f. drop-down list/form_for label.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: f. +# contributor: Translated from TextMate Snippet +# name: f.label (ffl) +## condition: "text.html.ruby, text.haml" +# -- +<%= f.label :${1:attribute}${2:, "${3:${1:$(capitalize (replace-regexp-in-string "_" " " yas/text))}}"} %> \ No newline at end of file diff --git a/extras/imported/rails-mode/form_for f. drop-down list/form_for password_field.yasnippet b/extras/imported/rails-mode/form_for f. drop-down list/form_for password_field.yasnippet new file mode 100644 index 0000000..60275f7 --- /dev/null +++ b/extras/imported/rails-mode/form_for f. drop-down list/form_for password_field.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: f. +# contributor: Translated from TextMate Snippet +# name: f.password_field (ffpf) +## condition: "text.html.ruby, text.haml" +# -- +<%= f.password_field :${1:attribute} %> \ No newline at end of file diff --git a/extras/imported/rails-mode/form_for f. drop-down list/form_for radio_box.yasnippet b/extras/imported/rails-mode/form_for f. drop-down list/form_for radio_box.yasnippet new file mode 100644 index 0000000..4b430c1 --- /dev/null +++ b/extras/imported/rails-mode/form_for f. drop-down list/form_for radio_box.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: f. +# contributor: Translated from TextMate Snippet +# name: f.radio_box (ffrb) +## condition: "text.html.ruby, text.haml" +# -- +<%= f.radio_box :${1:attribute}, :${2:tag_value} %> \ No newline at end of file diff --git a/extras/imported/rails-mode/form_for f. drop-down list/form_for submit.yasnippet b/extras/imported/rails-mode/form_for f. drop-down list/form_for submit.yasnippet new file mode 100644 index 0000000..f41553a --- /dev/null +++ b/extras/imported/rails-mode/form_for f. drop-down list/form_for submit.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: f. +# contributor: Translated from TextMate Snippet +# name: f.submit (ffs) +## condition: "text.html.ruby, text.haml" +# -- +<%= f.submit "${1:Submit}"${2:, :disable_with => '${3:$1ing...}'} %> \ No newline at end of file diff --git a/extras/imported/rails-mode/form_for f. drop-down list/form_for text_area.yasnippet b/extras/imported/rails-mode/form_for f. drop-down list/form_for text_area.yasnippet new file mode 100644 index 0000000..e9366d3 --- /dev/null +++ b/extras/imported/rails-mode/form_for f. drop-down list/form_for text_area.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: f. +# contributor: Translated from TextMate Snippet +# name: f.text_area (ffta) +## condition: "text.html.ruby, text.haml" +# -- +<%= f.text_area :${1:attribute} %> \ No newline at end of file diff --git a/extras/imported/rails-mode/form_for f. drop-down list/form_for text_field.yasnippet b/extras/imported/rails-mode/form_for f. drop-down list/form_for text_field.yasnippet new file mode 100644 index 0000000..c29dd1b --- /dev/null +++ b/extras/imported/rails-mode/form_for f. drop-down list/form_for text_field.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: f. +# contributor: Translated from TextMate Snippet +# name: f.text_field (fftf) +## condition: "text.html.ruby, text.haml" +# -- +<%= f.text_field :${1:attribute} %> \ No newline at end of file diff --git a/extras/imported/rails-mode/form_for helpers/form_for check_box.yasnippet b/extras/imported/rails-mode/form_for helpers/form_for check_box.yasnippet new file mode 100644 index 0000000..f041cdf --- /dev/null +++ b/extras/imported/rails-mode/form_for helpers/form_for check_box.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: ffcb +# contributor: Translated from TextMate Snippet +# name: form_for check_box +## condition: "text.html.ruby, text.haml" +# -- +<%= f.check_box :${1:attribute} %> \ No newline at end of file diff --git a/extras/imported/rails-mode/form_for helpers/form_for file_field 2.yasnippet b/extras/imported/rails-mode/form_for helpers/form_for file_field 2.yasnippet new file mode 100644 index 0000000..cfd3a22 --- /dev/null +++ b/extras/imported/rails-mode/form_for helpers/form_for file_field 2.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: ffff +# contributor: Translated from TextMate Snippet +# name: form_for file_field +## condition: "text.html.ruby, text.haml" +# -- +<%= f.file_field :${1:attribute} %> \ No newline at end of file diff --git a/extras/imported/rails-mode/form_for helpers/form_for hidden_field 2.yasnippet b/extras/imported/rails-mode/form_for helpers/form_for hidden_field 2.yasnippet new file mode 100644 index 0000000..19e5e3b --- /dev/null +++ b/extras/imported/rails-mode/form_for helpers/form_for hidden_field 2.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: ffhf +# contributor: Translated from TextMate Snippet +# name: form_for hidden_field +## condition: "text.html.ruby, text.haml" +# -- +<%= f.hidden_field :${1:attribute} %> \ No newline at end of file diff --git a/extras/imported/rails-mode/form_for helpers/form_for label 2.yasnippet b/extras/imported/rails-mode/form_for helpers/form_for label 2.yasnippet new file mode 100644 index 0000000..607c4df --- /dev/null +++ b/extras/imported/rails-mode/form_for helpers/form_for label 2.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: ffl +# contributor: Translated from TextMate Snippet +# name: form_for label +## condition: "text.html.ruby, text.haml" +# -- +<%= f.label :${1:attribute}${2:, "${3:${1:$(capitalize (replace-regexp-in-string "_" " " yas/text))}}"} %> \ No newline at end of file diff --git a/extras/imported/rails-mode/form_for helpers/form_for password_field 2.yasnippet b/extras/imported/rails-mode/form_for helpers/form_for password_field 2.yasnippet new file mode 100644 index 0000000..1c102bd --- /dev/null +++ b/extras/imported/rails-mode/form_for helpers/form_for password_field 2.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: ffpf +# contributor: Translated from TextMate Snippet +# name: form_for password_field +## condition: "text.html.ruby, text.haml" +# -- +<%= f.password_field :${1:attribute} %> \ No newline at end of file diff --git a/extras/imported/rails-mode/form_for helpers/form_for radio_box 2.yasnippet b/extras/imported/rails-mode/form_for helpers/form_for radio_box 2.yasnippet new file mode 100644 index 0000000..404dd74 --- /dev/null +++ b/extras/imported/rails-mode/form_for helpers/form_for radio_box 2.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: ffrb +# contributor: Translated from TextMate Snippet +# name: form_for radio_box +## condition: "text.html.ruby, text.haml" +# -- +<%= f.radio_box :${1:attribute}, :${2:tag_value} %> \ No newline at end of file diff --git a/extras/imported/rails-mode/form_for helpers/form_for submit 2.yasnippet b/extras/imported/rails-mode/form_for helpers/form_for submit 2.yasnippet new file mode 100644 index 0000000..6005cdf --- /dev/null +++ b/extras/imported/rails-mode/form_for helpers/form_for submit 2.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: ffs +# contributor: Translated from TextMate Snippet +# name: form_for submit +## condition: "text.html.ruby, text.haml" +# -- +<%= f.submit "${1:Submit}"${2:, :disable_with => '${3:$1ing...}'} %> \ No newline at end of file diff --git a/extras/imported/rails-mode/form_for helpers/form_for text_area 2.yasnippet b/extras/imported/rails-mode/form_for helpers/form_for text_area 2.yasnippet new file mode 100644 index 0000000..5f6f27c --- /dev/null +++ b/extras/imported/rails-mode/form_for helpers/form_for text_area 2.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: ffta +# contributor: Translated from TextMate Snippet +# name: form_for text_area +## condition: "text.html.ruby, text.haml" +# -- +<%= f.text_area :${1:attribute} %> \ No newline at end of file diff --git a/extras/imported/rails-mode/form_for helpers/form_for text_field 2.yasnippet b/extras/imported/rails-mode/form_for helpers/form_for text_field 2.yasnippet new file mode 100644 index 0000000..1fe99d9 --- /dev/null +++ b/extras/imported/rails-mode/form_for helpers/form_for text_field 2.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: fftf +# contributor: Translated from TextMate Snippet +# name: form_for text_field +## condition: "text.html.ruby, text.haml" +# -- +<%= f.text_field :${1:attribute} %> \ No newline at end of file diff --git a/extras/imported/rails-mode/link_to/lia.yasnippet b/extras/imported/rails-mode/link_to/lia.yasnippet new file mode 100644 index 0000000..892c727 --- /dev/null +++ b/extras/imported/rails-mode/link_to/lia.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: lia +# contributor: Translated from TextMate Snippet +# name: link_to (action) +## condition: "text.html.ruby, text.haml" +# -- +<%= link_to "${1:link text...}", :action => "${2:index}" %> \ No newline at end of file diff --git a/extras/imported/rails-mode/link_to/liai.yasnippet b/extras/imported/rails-mode/link_to/liai.yasnippet new file mode 100644 index 0000000..ec62323 --- /dev/null +++ b/extras/imported/rails-mode/link_to/liai.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: liai +# contributor: Translated from TextMate Snippet +# name: link_to (action, id) +## condition: "text.html.ruby, text.haml" +# -- +<%= link_to "${1:link text...}", :action => "${2:edit}", :id => ${3:@item} %> \ No newline at end of file diff --git a/extras/imported/rails-mode/link_to/lic.yasnippet b/extras/imported/rails-mode/link_to/lic.yasnippet new file mode 100644 index 0000000..049877f --- /dev/null +++ b/extras/imported/rails-mode/link_to/lic.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: lic +# contributor: Translated from TextMate Snippet +# name: link_to (controller) +## condition: "text.html.ruby, text.haml" +# -- +<%= link_to "${1:link text...}", :controller => "${2:items}" %> \ No newline at end of file diff --git a/extras/imported/rails-mode/link_to/lica.yasnippet b/extras/imported/rails-mode/link_to/lica.yasnippet new file mode 100644 index 0000000..0305a45 --- /dev/null +++ b/extras/imported/rails-mode/link_to/lica.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: lica +# contributor: Translated from TextMate Snippet +# name: link_to (controller, action) +## condition: "text.html.ruby, text.haml" +# -- +<%= link_to "${1:link text...}", :controller => "${2:items}", :action => "${3:index}" %> \ No newline at end of file diff --git a/extras/imported/rails-mode/link_to/licai.yasnippet b/extras/imported/rails-mode/link_to/licai.yasnippet new file mode 100644 index 0000000..d0cd81c --- /dev/null +++ b/extras/imported/rails-mode/link_to/licai.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: licai +# contributor: Translated from TextMate Snippet +# name: link_to (controller, action, id) +## condition: "text.html.ruby, text.haml" +# -- +<%= link_to "${1:link text...}", :controller => "${2:items}", :action => "${3:edit}", :id => ${4:@item} %> \ No newline at end of file diff --git a/extras/imported/rails-mode/link_to/link_to (nested path plural).yasnippet b/extras/imported/rails-mode/link_to/link_to (nested path plural).yasnippet new file mode 100644 index 0000000..2b16c13 --- /dev/null +++ b/extras/imported/rails-mode/link_to/link_to (nested path plural).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: linpp +# contributor: Translated from TextMate Snippet +# name: link_to (nested path plural) +## condition: "text.html.ruby, text.haml" +# -- +<%= link_to ${1:"${2:link text...}"}, ${3:${10:parent}_${11:child}_path(${12:@}${13:$10})} %> \ No newline at end of file diff --git a/extras/imported/rails-mode/link_to/link_to (nested path).yasnippet b/extras/imported/rails-mode/link_to/link_to (nested path).yasnippet new file mode 100644 index 0000000..aa57864 --- /dev/null +++ b/extras/imported/rails-mode/link_to/link_to (nested path).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: linp +# contributor: Translated from TextMate Snippet +# name: link_to (nested path) +## condition: "text.html.ruby, text.haml" +# -- +<%= link_to ${1:"${2:link text...}"}, ${3:${12:parent}_${13:child}_path(${14:@}${15:$12}, ${16:@}${17:$13})} %> \ No newline at end of file diff --git a/extras/imported/rails-mode/link_to/link_to (path plural).yasnippet b/extras/imported/rails-mode/link_to/link_to (path plural).yasnippet new file mode 100644 index 0000000..9d1834d --- /dev/null +++ b/extras/imported/rails-mode/link_to/link_to (path plural).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: lipp +# contributor: Translated from TextMate Snippet +# name: link_to (path plural) +## condition: "text.html.ruby, text.haml" +# -- +<%= link_to ${1:"${2:link text...}"}, ${3:${4:model}s_path} %> \ No newline at end of file diff --git a/extras/imported/rails-mode/link_to/link_to (path).yasnippet b/extras/imported/rails-mode/link_to/link_to (path).yasnippet new file mode 100644 index 0000000..2213b7c --- /dev/null +++ b/extras/imported/rails-mode/link_to/link_to (path).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: lip +# contributor: Translated from TextMate Snippet +# name: link_to (path) +## condition: "text.html.ruby, text.haml" +# -- +<%= link_to ${1:"${2:link text...}"}, ${3:${12:model}_path(${13:@}${14:$12})} %> \ No newline at end of file diff --git a/extras/imported/rails-mode/link_to/link_to model.yasnippet b/extras/imported/rails-mode/link_to/link_to model.yasnippet new file mode 100644 index 0000000..ea023ef --- /dev/null +++ b/extras/imported/rails-mode/link_to/link_to model.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: lim +# contributor: Translated from TextMate Snippet +# name: link_to model +## condition: "text.html.ruby, text.haml" +# -- +<%= link_to ${1:model}.${2:name}, ${3:${4:$1}_path(${14:$1})} %> \ No newline at end of file diff --git a/extras/imported/rails-mode/rails params.yasnippet b/extras/imported/rails-mode/rails params.yasnippet new file mode 100644 index 0000000..da63348 --- /dev/null +++ b/extras/imported/rails-mode/rails params.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# contributor: Translated from TextMate Snippet +# name: params[…] +## binding: "^p" +## condition: "source.ruby.rails" +# -- +params[:${1:id}] \ No newline at end of file diff --git a/extras/imported/rails-mode/rails session.yasnippet b/extras/imported/rails-mode/rails session.yasnippet new file mode 100644 index 0000000..582e023 --- /dev/null +++ b/extras/imported/rails-mode/rails session.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# contributor: Translated from TextMate Snippet +# name: session[…] +## binding: "^j" +## condition: "source.ruby.rails" +# -- +session[:${1:user}] \ No newline at end of file diff --git a/extras/imported/rails-mode/redirect_to/rea.yasnippet b/extras/imported/rails-mode/redirect_to/rea.yasnippet new file mode 100644 index 0000000..fb73529 --- /dev/null +++ b/extras/imported/rails-mode/redirect_to/rea.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: rea +# contributor: Translated from TextMate Snippet +# name: redirect_to (action) +## condition: "source.ruby.rails" +# -- +redirect_to :action => "${1:index}" \ No newline at end of file diff --git a/extras/imported/rails-mode/redirect_to/reai.yasnippet b/extras/imported/rails-mode/redirect_to/reai.yasnippet new file mode 100644 index 0000000..6a46e49 --- /dev/null +++ b/extras/imported/rails-mode/redirect_to/reai.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: reai +# contributor: Translated from TextMate Snippet +# name: redirect_to (action, id) +## condition: "source.ruby.rails" +# -- +redirect_to :action => "${1:show}", :id => ${2:@item} \ No newline at end of file diff --git a/extras/imported/rails-mode/redirect_to/rec.yasnippet b/extras/imported/rails-mode/redirect_to/rec.yasnippet new file mode 100644 index 0000000..a984add --- /dev/null +++ b/extras/imported/rails-mode/redirect_to/rec.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: rec +# contributor: Translated from TextMate Snippet +# name: redirect_to (controller) +## condition: "source.ruby.rails" +# -- +redirect_to :controller => "${1:items}" \ No newline at end of file diff --git a/extras/imported/rails-mode/redirect_to/reca.yasnippet b/extras/imported/rails-mode/redirect_to/reca.yasnippet new file mode 100644 index 0000000..6d96a5e --- /dev/null +++ b/extras/imported/rails-mode/redirect_to/reca.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: reca +# contributor: Translated from TextMate Snippet +# name: redirect_to (controller, action) +## condition: "source.ruby.rails" +# -- +redirect_to :controller => "${1:items}", :action => "${2:list}" \ No newline at end of file diff --git a/extras/imported/rails-mode/redirect_to/recai.yasnippet b/extras/imported/rails-mode/redirect_to/recai.yasnippet new file mode 100644 index 0000000..730b304 --- /dev/null +++ b/extras/imported/rails-mode/redirect_to/recai.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: recai +# contributor: Translated from TextMate Snippet +# name: redirect_to (controller, action, id) +## condition: "source.ruby.rails" +# -- +redirect_to :controller => "${1:items}", :action => "${2:show}", :id => ${3:@item} \ No newline at end of file diff --git a/extras/imported/rails-mode/redirect_to/redirect_to (nested path plural).yasnippet b/extras/imported/rails-mode/redirect_to/redirect_to (nested path plural).yasnippet new file mode 100644 index 0000000..7f21a8f --- /dev/null +++ b/extras/imported/rails-mode/redirect_to/redirect_to (nested path plural).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: renpp +# contributor: Translated from TextMate Snippet +# name: redirect_to (nested path plural) +## condition: "source.ruby.rails" +# -- +redirect_to(${2:${10:parent}_${11:child}_path(${12:@}${13:$10})}) \ No newline at end of file diff --git a/extras/imported/rails-mode/redirect_to/redirect_to (nested path).yasnippet b/extras/imported/rails-mode/redirect_to/redirect_to (nested path).yasnippet new file mode 100644 index 0000000..c62edc7 --- /dev/null +++ b/extras/imported/rails-mode/redirect_to/redirect_to (nested path).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: renp +# contributor: Translated from TextMate Snippet +# name: redirect_to (nested path) +## condition: "source.ruby.rails" +# -- +redirect_to(${2:${12:parent}_${13:child}_path(${14:@}${15:$12}, ${16:@}${17:$13})}) \ No newline at end of file diff --git a/extras/imported/rails-mode/redirect_to/redirect_to (path plural).yasnippet b/extras/imported/rails-mode/redirect_to/redirect_to (path plural).yasnippet new file mode 100644 index 0000000..ad0a457 --- /dev/null +++ b/extras/imported/rails-mode/redirect_to/redirect_to (path plural).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: repp +# contributor: Translated from TextMate Snippet +# name: redirect_to (path plural) +## condition: "source.ruby.rails" +# -- +redirect_to(${2:${10:model}s_path}) \ No newline at end of file diff --git a/extras/imported/rails-mode/redirect_to/redirect_to (path).yasnippet b/extras/imported/rails-mode/redirect_to/redirect_to (path).yasnippet new file mode 100644 index 0000000..04fe1ee --- /dev/null +++ b/extras/imported/rails-mode/redirect_to/redirect_to (path).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: rep +# contributor: Translated from TextMate Snippet +# name: redirect_to (path) +## condition: "source.ruby.rails" +# -- +redirect_to(${2:${12:model}_path(${13:@}${14:$12})}) \ No newline at end of file diff --git a/extras/imported/rails-mode/render/render (action)... (ra).yasnippet b/extras/imported/rails-mode/render/render (action)... (ra).yasnippet new file mode 100644 index 0000000..8b1c3e6 --- /dev/null +++ b/extras/imported/rails-mode/render/render (action)... (ra).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: ra +# contributor: Translated from TextMate Snippet +# name: render (action) +## condition: "source.ruby.rails" +# -- +render :action => "${1:action}" \ No newline at end of file diff --git a/extras/imported/rails-mode/render/render (action,layout) (ral).yasnippet b/extras/imported/rails-mode/render/render (action,layout) (ral).yasnippet new file mode 100644 index 0000000..b99bf82 --- /dev/null +++ b/extras/imported/rails-mode/render/render (action,layout) (ral).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: ral +# contributor: Translated from TextMate Snippet +# name: render (action, layout) +## condition: "source.ruby.rails" +# -- +render :action => "${1:action}", :layout => "${2:layoutname}" \ No newline at end of file diff --git a/extras/imported/rails-mode/render/render (file) (rf).yasnippet b/extras/imported/rails-mode/render/render (file) (rf).yasnippet new file mode 100644 index 0000000..638f4c1 --- /dev/null +++ b/extras/imported/rails-mode/render/render (file) (rf).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: rf +# contributor: Translated from TextMate Snippet +# name: render (file) +## condition: "source.ruby.rails" +# -- +render :file => "${1:filepath}" \ No newline at end of file diff --git a/extras/imported/rails-mode/render/render (file,use_full_path) (rfu).yasnippet b/extras/imported/rails-mode/render/render (file,use_full_path) (rfu).yasnippet new file mode 100644 index 0000000..e1abb43 --- /dev/null +++ b/extras/imported/rails-mode/render/render (file,use_full_path) (rfu).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: rfu +# contributor: Translated from TextMate Snippet +# name: render (file, use_full_path) +## condition: "source.ruby.rails" +# -- +render :file => "${1:filepath}", :use_full_path => ${2:false} \ No newline at end of file diff --git a/extras/imported/rails-mode/render/render (inline) (ri).yasnippet b/extras/imported/rails-mode/render/render (inline) (ri).yasnippet new file mode 100644 index 0000000..eb150fd --- /dev/null +++ b/extras/imported/rails-mode/render/render (inline) (ri).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: ri +# contributor: Translated from TextMate Snippet +# name: render (inline) +## condition: "source.ruby.rails" +# -- +render :inline => "${1:<%= 'hello' %>}" \ No newline at end of file diff --git a/extras/imported/rails-mode/render/render (inline,locals) (ril).yasnippet b/extras/imported/rails-mode/render/render (inline,locals) (ril).yasnippet new file mode 100644 index 0000000..4626458 --- /dev/null +++ b/extras/imported/rails-mode/render/render (inline,locals) (ril).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: ril +# contributor: Translated from TextMate Snippet +# name: render (inline, locals) +## condition: "source.ruby.rails" +# -- +render :inline => "${1:<%= 'hello' %>}", :locals => { ${2::name} => "${3:value}"$4 } \ No newline at end of file diff --git a/extras/imported/rails-mode/render/render (inline,type) (rit).yasnippet b/extras/imported/rails-mode/render/render (inline,type) (rit).yasnippet new file mode 100644 index 0000000..279cfd0 --- /dev/null +++ b/extras/imported/rails-mode/render/render (inline,type) (rit).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: rit +# contributor: Translated from TextMate Snippet +# name: render (inline, type) +## condition: "source.ruby.rails" +# -- +render :inline => "${1:<%= 'hello' %>}", :type => ${2::rxml} \ No newline at end of file diff --git a/extras/imported/rails-mode/render/render (layout) (rl).yasnippet b/extras/imported/rails-mode/render/render (layout) (rl).yasnippet new file mode 100644 index 0000000..a059e7c --- /dev/null +++ b/extras/imported/rails-mode/render/render (layout) (rl).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: rl +# contributor: Translated from TextMate Snippet +# name: render (layout) +## condition: "source.ruby.rails" +# -- +render :layout => "${1:layoutname}" \ No newline at end of file diff --git a/extras/imported/rails-mode/render/render (nothing) (rn).yasnippet b/extras/imported/rails-mode/render/render (nothing) (rn).yasnippet new file mode 100644 index 0000000..eb8a1b8 --- /dev/null +++ b/extras/imported/rails-mode/render/render (nothing) (rn).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: rn +# contributor: Translated from TextMate Snippet +# name: render (nothing) +## condition: "source.ruby.rails" +# -- +render :nothing => ${1:true} \ No newline at end of file diff --git a/extras/imported/rails-mode/render/render (nothing,status) (rns).yasnippet b/extras/imported/rails-mode/render/render (nothing,status) (rns).yasnippet new file mode 100644 index 0000000..725ce20 --- /dev/null +++ b/extras/imported/rails-mode/render/render (nothing,status) (rns).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: rns +# contributor: Translated from TextMate Snippet +# name: render (nothing, status) +## condition: "source.ruby.rails" +# -- +render :nothing => ${1:true}, :status => ${2:401} \ No newline at end of file diff --git a/extras/imported/rails-mode/render/render (partial) (rp).yasnippet b/extras/imported/rails-mode/render/render (partial) (rp).yasnippet new file mode 100644 index 0000000..c4fa85e --- /dev/null +++ b/extras/imported/rails-mode/render/render (partial) (rp).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: rp +# contributor: Translated from TextMate Snippet +# name: render (partial) +## condition: "source.ruby.rails" +# -- +render :partial => "${1:item}" \ No newline at end of file diff --git a/extras/imported/rails-mode/render/render (partial,collection) (rpc).yasnippet b/extras/imported/rails-mode/render/render (partial,collection) (rpc).yasnippet new file mode 100644 index 0000000..2f33c67 --- /dev/null +++ b/extras/imported/rails-mode/render/render (partial,collection) (rpc).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: rpc +# contributor: Translated from TextMate Snippet +# name: render (partial, collection) +## condition: "source.ruby.rails" +# -- +render :partial => "${1:item}", :collection => ${2:@$1s} \ No newline at end of file diff --git a/extras/imported/rails-mode/render/render (partial,locals) (rpl).yasnippet b/extras/imported/rails-mode/render/render (partial,locals) (rpl).yasnippet new file mode 100644 index 0000000..57dad63 --- /dev/null +++ b/extras/imported/rails-mode/render/render (partial,locals) (rpl).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: rpl +# contributor: Translated from TextMate Snippet +# name: render (partial, locals) +## condition: "source.ruby.rails" +# -- +render :partial => "${1:item}", :locals => { :${2:$1} => ${3:@$1}$0 } \ No newline at end of file diff --git a/extras/imported/rails-mode/render/render (partial,object) (rpo).yasnippet b/extras/imported/rails-mode/render/render (partial,object) (rpo).yasnippet new file mode 100644 index 0000000..a3496fc --- /dev/null +++ b/extras/imported/rails-mode/render/render (partial,object) (rpo).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: rpo +# contributor: Translated from TextMate Snippet +# name: render (partial, object) +## condition: "source.ruby.rails" +# -- +render :partial => "${1:item}", :object => ${2:@$1} \ No newline at end of file diff --git a/extras/imported/rails-mode/render/render (partial,status) (rps).yasnippet b/extras/imported/rails-mode/render/render (partial,status) (rps).yasnippet new file mode 100644 index 0000000..fb76f2d --- /dev/null +++ b/extras/imported/rails-mode/render/render (partial,status) (rps).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: rps +# contributor: Translated from TextMate Snippet +# name: render (partial, status) +## condition: "source.ruby.rails" +# -- +render :partial => "${1:item}", :status => ${2:500} \ No newline at end of file diff --git a/extras/imported/rails-mode/render/render (text) (rt).yasnippet b/extras/imported/rails-mode/render/render (text) (rt).yasnippet new file mode 100644 index 0000000..d2eaa5a --- /dev/null +++ b/extras/imported/rails-mode/render/render (text) (rt).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: rt +# contributor: Translated from TextMate Snippet +# name: render (text) +## condition: "source.ruby.rails" +# -- +render :text => "${1:text to render...}" \ No newline at end of file diff --git a/extras/imported/rails-mode/render/render (text,layout) (rtl).yasnippet b/extras/imported/rails-mode/render/render (text,layout) (rtl).yasnippet new file mode 100644 index 0000000..0be94e2 --- /dev/null +++ b/extras/imported/rails-mode/render/render (text,layout) (rtl).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: rtl +# contributor: Translated from TextMate Snippet +# name: render (text, layout) +## condition: "source.ruby.rails" +# -- +render :text => "${1:text to render...}", :layout => "${2:layoutname}" \ No newline at end of file diff --git a/extras/imported/rails-mode/render/render (text,layout=3Etrue) (rtlt).yasnippet b/extras/imported/rails-mode/render/render (text,layout=3Etrue) (rtlt).yasnippet new file mode 100644 index 0000000..7011ffc --- /dev/null +++ b/extras/imported/rails-mode/render/render (text,layout=3Etrue) (rtlt).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: rtlt +# contributor: Translated from TextMate Snippet +# name: render (text, layout => true) +## condition: "source.ruby.rails" +# -- +render :text => "${1:text to render...}", :layout => ${2:true} \ No newline at end of file diff --git a/extras/imported/rails-mode/render/render (text,status) (rts).yasnippet b/extras/imported/rails-mode/render/render (text,status) (rts).yasnippet new file mode 100644 index 0000000..4cbcaeb --- /dev/null +++ b/extras/imported/rails-mode/render/render (text,status) (rts).yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: rts +# contributor: Translated from TextMate Snippet +# name: render (text, status) +## condition: "source.ruby.rails" +# -- +render :text => "${1:text to render...}", :status => ${2:401} \ No newline at end of file diff --git a/extras/imported/rails-mode/render/render (update).yasnippet b/extras/imported/rails-mode/render/render (update).yasnippet new file mode 100644 index 0000000..2a365fa --- /dev/null +++ b/extras/imported/rails-mode/render/render (update).yasnippet @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# key: ru +# contributor: Translated from TextMate Snippet +# name: render (update) +## condition: "source.ruby.rails" +# -- +render :update do |${2:page}| + $2.$0 +end \ No newline at end of file diff --git a/extras/imported/rails-mode/respond_to/respond_to (html).yasnippet b/extras/imported/rails-mode/respond_to/respond_to (html).yasnippet new file mode 100644 index 0000000..0470a2c --- /dev/null +++ b/extras/imported/rails-mode/respond_to/respond_to (html).yasnippet @@ -0,0 +1,12 @@ +# -*- mode: snippet -*- +# contributor: Translated from TextMate Snippet +# name: respond_to (html) +## binding: "@H" +## condition: "meta.rails.controller" +# -- +respond_to do |wants| + wants.html do + `yas/selected-text` + end + wants.${1:js} { $0 } +end \ No newline at end of file diff --git a/extras/imported/rails-mode/respond_to/respond_to.yasnippet b/extras/imported/rails-mode/respond_to/respond_to.yasnippet new file mode 100644 index 0000000..5cdd92a --- /dev/null +++ b/extras/imported/rails-mode/respond_to/respond_to.yasnippet @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# key: rest +# contributor: Translated from TextMate Snippet +# name: respond_to +## condition: "meta.rails.controller" +# -- +respond_to do |wants| + wants.${1:html}${2: { $0 \}} +end \ No newline at end of file diff --git a/extras/imported/rails-mode/respond_to/wants_format.yasnippet b/extras/imported/rails-mode/respond_to/wants_format.yasnippet new file mode 100644 index 0000000..85dd64e --- /dev/null +++ b/extras/imported/rails-mode/respond_to/wants_format.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: wants +# contributor: Translated from TextMate Snippet +# name: wants.format +## condition: "meta.rails.controller" +# -- +wants.${1:js|xml|html}${2: { $0 \}} \ No newline at end of file diff --git a/extras/textmate_import.rb b/extras/textmate_import.rb index a21d19b..b2a0515 100755 --- a/extras/textmate_import.rb +++ b/extras/textmate_import.rb @@ -142,6 +142,7 @@ class TmSnippet def to_yasnippet doc = "# -*- mode: snippet -*-\n" + doc << "# type: command\n" unless self.content doc << "# key: #{self.tab_trigger}\n" if self.tab_trigger doc << "# contributor: Translated from TextMate Snippet\n" doc << "# name: #{self.name}\n"