Skip to content
Browse files

Updated before_validation and after_validation to Rails 3 syntax.

  • Loading branch information...
1 parent 3b74b5f commit 40a4585ae6872c987f11fa8f03de22d294f95856 @carlosbrando carlosbrando committed Jun 24, 2010
View
4 Snippets/after_validation.tmSnippet
@@ -3,11 +3,11 @@
<plist version="1.0">
<dict>
<key>content</key>
- <string>after_validation </string>
+ <string>after_validation :${1:field}${2:, :on =&gt; :${3:create|update}${4:${5:, :allow_blank =&gt; true}${6:, :allow_nil =&gt; true}}}$0</string>
<key>name</key>
<string>after_validation</string>
<key>scope</key>
- <string>source.ruby.rails</string>
+ <string>meta.rails.model</string>
<key>tabTrigger</key>
<string>aftv</string>
<key>uuid</key>
View
16 Snippets/after_validation_on_create.tmSnippet
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>content</key>
- <string>after_validation_on_create </string>
- <key>name</key>
- <string>after_validation_on_create</string>
- <key>scope</key>
- <string>source.ruby.rails</string>
- <key>tabTrigger</key>
- <string>aftvoc</string>
- <key>uuid</key>
- <string>BA0DE6C7-EAD3-42C9-8ABB-2B9A5F2FE225</string>
-</dict>
-</plist>
View
16 Snippets/after_validation_on_update.tmSnippet
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>content</key>
- <string>after_validation_on_update </string>
- <key>name</key>
- <string>after_validation_on_update</string>
- <key>scope</key>
- <string>source.ruby.rails</string>
- <key>tabTrigger</key>
- <string>aftvou</string>
- <key>uuid</key>
- <string>BCB25D36-2D3F-41E9-B2CF-37D6E883E8D1</string>
-</dict>
-</plist>
View
4 Snippets/before_validation.tmSnippet
@@ -3,11 +3,11 @@
<plist version="1.0">
<dict>
<key>content</key>
- <string>before_validation </string>
+ <string>before_validation :${1:field}${2:, :on =&gt; :${3:create|update}${4:${5:, :allow_blank =&gt; true}${6:, :allow_nil =&gt; true}}}$0</string>
<key>name</key>
<string>before_validation</string>
<key>scope</key>
- <string>source.ruby.rails</string>
+ <string>meta.rails.model</string>
<key>tabTrigger</key>
<string>befv</string>
<key>uuid</key>
View
16 Snippets/before_validation_on_create.tmSnippet
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>content</key>
- <string>before_validation_on_create </string>
- <key>name</key>
- <string>before_validation_on_create</string>
- <key>scope</key>
- <string>source.ruby.rails</string>
- <key>tabTrigger</key>
- <string>befvoc</string>
- <key>uuid</key>
- <string>E2CE2E3B-8A61-4866-9AF5-A12F44CF7233</string>
-</dict>
-</plist>
View
16 Snippets/before_validation_on_update.tmSnippet
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>content</key>
- <string>before_validation_on_update</string>
- <key>name</key>
- <string>before_validation_on_update</string>
- <key>scope</key>
- <string>source.ruby.rails</string>
- <key>tabTrigger</key>
- <string>befvou</string>
- <key>uuid</key>
- <string>86CFB156-E72B-440F-9C7D-08A3375C3ADB</string>
-</dict>
-</plist>
View
8 info.plist
@@ -29,6 +29,10 @@
<string>47A6800A-DC7E-4F72-AA0D-CEE2488E1618</string>
<string>1CB65A0D-4FEC-4438-9B4F-8B0BD13FB875</string>
<string>4E286CB4-069E-474C-A970-95216FE7DE95</string>
+ <string>E2CE2E3B-8A61-4866-9AF5-A12F44CF7233</string>
+ <string>86CFB156-E72B-440F-9C7D-08A3375C3ADB</string>
+ <string>BA0DE6C7-EAD3-42C9-8ABB-2B9A5F2FE225</string>
+ <string>BCB25D36-2D3F-41E9-B2CF-37D6E883E8D1</string>
</array>
<key>description</key>
<string>&lt;a href="http://www.rubyonrails.com/"&gt;Ruby on Rails&lt;/a&gt; is a full-stack framework for developing database-backed web applications, in Ruby, according to the Model-View-Control pattern.</string>
@@ -917,11 +921,7 @@
<string>F5CBBE16-F5CC-4EDA-8BC6-30281BD7D854</string>
<string>5CE8838A-BF2C-497E-B87A-E90C3BC482E0</string>
<string>A1776279-5396-4FE9-9218-8BF2C88C5271</string>
- <string>E2CE2E3B-8A61-4866-9AF5-A12F44CF7233</string>
- <string>86CFB156-E72B-440F-9C7D-08A3375C3ADB</string>
<string>44FBD811-70A9-462B-AC56-F975ADAD62AF</string>
- <string>BA0DE6C7-EAD3-42C9-8ABB-2B9A5F2FE225</string>
- <string>BCB25D36-2D3F-41E9-B2CF-37D6E883E8D1</string>
<string>523BE8A6-0845-493D-A9B6-532F73D21950</string>
<string>3F4B502B-5F68-4687-88E9-6EF3BDF9677D</string>
<string>1C20EEBE-B4BA-48C8-9B33-7B5BB00D958C</string>

0 comments on commit 40a4585

Please sign in to comment.
Something went wrong with that request. Please try again.