Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update legacy '<before|after>_validation_on_<create|update>' callbacks

  • Loading branch information...
commit 216df52ca4ece1f30cb14ad9d61586ad4cdaa4bb 1 parent 0a67c0e
@tadast authored
View
2  Ruby on Rails.tmLanguage
@@ -264,7 +264,7 @@
</dict>
<dict>
<key>match</key>
- <string>\b(named_scope|after_create|after_destroy|after_save|after_update|after_validation|after_validation_on_create|after_validation_on_update|before_create|before_destroy|before_save|before_update|before_validation|before_validation_on_create|before_validation_on_update|composed_of|belongs_to|has_one|has_many|has_and_belongs_to_many|validate|validate_on_create|validates_numericality_of|validate_on_update|validates_acceptance_of|validates_associated|validates_confirmation_of|validates_each|validates_format_of|validates_inclusion_of|validates_exclusion_of|validates_length_of|validates_presence_of|validates_size_of|validates_uniqueness_of|attr_protected|attr_accessible|attr_readonly)\b</string>
+ <string>\b(named_scope|after_create|after_destroy|after_save|after_update|after_validation|before_create|before_destroy|before_save|before_update|before_validation|composed_of|belongs_to|has_one|has_many|has_and_belongs_to_many|validate|validate_on_create|validates_numericality_of|validate_on_update|validates_acceptance_of|validates_associated|validates_confirmation_of|validates_each|validates_format_of|validates_inclusion_of|validates_exclusion_of|validates_length_of|validates_presence_of|validates_size_of|validates_uniqueness_of|attr_protected|attr_accessible|attr_readonly)\b</string>
<key>name</key>
<string>support.function.activerecord.rails</string>
</dict>
View
4 after_validation_on_create.sublime-snippet
@@ -1,6 +1,6 @@
<snippet>
- <content><![CDATA[after_validation_on_create ]]></content>
+ <content><![CDATA[after_validation ${1:validation_method}, on: :create]]></content>
<tabTrigger>aftvoc</tabTrigger>
<scope>source.ruby.rails</scope>
- <description>after_validation_on_create</description>
+ <description>after_validation on create</description>
</snippet>
View
4 after_validation_on_update.sublime-snippet
@@ -1,6 +1,6 @@
<snippet>
- <content><![CDATA[after_validation_on_update ]]></content>
+ <content><![CDATA[after_validation ${1:validation_method}, on: :update]]></content>
<tabTrigger>aftvou</tabTrigger>
<scope>source.ruby.rails</scope>
- <description>after_validation_on_update</description>
+ <description>after_validation on update</description>
</snippet>
View
4 before_validation_on_create.sublime-snippet
@@ -1,6 +1,6 @@
<snippet>
- <content><![CDATA[before_validation_on_create ]]></content>
+ <content><![CDATA[before_validation ${1:validation_method}, on: :create]]></content>
<tabTrigger>befvoc</tabTrigger>
<scope>source.ruby.rails</scope>
- <description>before_validation_on_create</description>
+ <description>before_validation on create</description>
</snippet>
View
4 before_validation_on_update.sublime-snippet
@@ -1,6 +1,6 @@
<snippet>
- <content><![CDATA[before_validation_on_update]]></content>
+ <content><![CDATA[before_validation ${1:validation_method}, on: :update]]></content>
<tabTrigger>befvou</tabTrigger>
<scope>source.ruby.rails</scope>
- <description>before_validation_on_update</description>
+ <description>before_validation on update</description>
</snippet>
Please sign in to comment.
Something went wrong with that request. Please try again.