Permalink
Browse files

Updated respond_to and respond_with to Rails 3.

  • Loading branch information...
1 parent 40a4585 commit 6efc35f5413c83e25b4888065b8bc8008659b9a2 @carlosbrando carlosbrando committed Jun 24, 2010
View
8 Snippets/wants_format.tmSnippet → Snippets/format (respond_with).tmSnippet
@@ -3,14 +3,14 @@
<plist version="1.0">
<dict>
<key>content</key>
- <string>wants.${1:js|xml|html}${2: { $0 \}}</string>
+ <string>format.${1:html|xml|json|js|any} { $0 }</string>
<key>name</key>
- <string>wants.format</string>
+ <string>format (respond_with)</string>
<key>scope</key>
<string>meta.rails.controller</string>
<key>tabTrigger</key>
- <string>wants</string>
+ <string>format</string>
<key>uuid</key>
- <string>3F26FDB4-ACF9-4856-9312-6A4D78DC8564</string>
+ <string>32AB6C81-2C22-45E0-B5FE-23CD3E420E70</string>
</dict>
</plist>
View
4 Snippets/respond_to.tmSnippet
@@ -3,9 +3,7 @@
<plist version="1.0">
<dict>
<key>content</key>
- <string>respond_to do |wants|
- wants.${1:html}${2: { $0 \}}
-end</string>
+ <string>respond_to :${1:html, :${2:xml, :${3:json}}}$0</string>
<key>name</key>
<string>respond_to</string>
<key>scope</key>
View
17 Snippets/respond_to (html).tmSnippet → Snippets/respond_with.tmSnippet
@@ -3,19 +3,16 @@
<plist version="1.0">
<dict>
<key>content</key>
- <string>respond_to do |wants|
- wants.html do
- $TM_SELECTED_TEXT
- end
- wants.${1:js} { $0 }
-end</string>
- <key>keyEquivalent</key>
- <string>@H</string>
+ <string>respond_with(${1:@${2:model}})${3: do |format|
+ format.${4:html} { $0 \}
+end}</string>
<key>name</key>
- <string>respond_to (html)</string>
+ <string>respond_with</string>
<key>scope</key>
<string>meta.rails.controller</string>
+ <key>tabTrigger</key>
+ <string>resw</string>
<key>uuid</key>
- <string>3BDD0D52-443E-4F5F-AE09-ABCC2ABE9A42</string>
+ <string>DDE1BA27-6259-4F87-A840-6A6E92C8594A</string>
</dict>
</plist>
View
14 info.plist
@@ -33,6 +33,8 @@
<string>86CFB156-E72B-440F-9C7D-08A3375C3ADB</string>
<string>BA0DE6C7-EAD3-42C9-8ABB-2B9A5F2FE225</string>
<string>BCB25D36-2D3F-41E9-B2CF-37D6E883E8D1</string>
+ <string>3BDD0D52-443E-4F5F-AE09-ABCC2ABE9A42</string>
+ <string>3F26FDB4-ACF9-4856-9312-6A4D78DC8564</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>
@@ -82,9 +84,9 @@
<dict>
<key>items</key>
<array>
- <string>3BDD0D52-443E-4F5F-AE09-ABCC2ABE9A42</string>
<string>B41D3164-EA53-4DDC-850E-27B82B24061F</string>
- <string>3F26FDB4-ACF9-4856-9312-6A4D78DC8564</string>
+ <string>DDE1BA27-6259-4F87-A840-6A6E92C8594A</string>
+ <string>32AB6C81-2C22-45E0-B5FE-23CD3E420E70</string>
</array>
<key>name</key>
<string>respond_to</string>
@@ -585,11 +587,7 @@
<key>items</key>
<array>
<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>4D1787E3-1583-4CF3-8D99-CC45D7C35EED</string>
<string>D64D8863-DCB6-4397-B5B0-073E0AE04167</string>
@@ -831,11 +829,11 @@
<string>67C5082F-5011-434A-8EAA-6B8D3600935F</string>
<string>ECB10C0B-E8B7-4606-ABF5-4A2A26E5AB1A</string>
<string>54F61419-001F-4B71-83AC-8DC633694AF0</string>
- <string>3BDD0D52-443E-4F5F-AE09-ABCC2ABE9A42</string>
<string>B41D3164-EA53-4DDC-850E-27B82B24061F</string>
+ <string>DDE1BA27-6259-4F87-A840-6A6E92C8594A</string>
+ <string>32AB6C81-2C22-45E0-B5FE-23CD3E420E70</string>
<string>B782A467-2C4D-48EB-AF39-518AFED4C056</string>
<string>CCF4C4A1-28EF-499D-AD81-4A4FD2FEF5B6</string>
- <string>3F26FDB4-ACF9-4856-9312-6A4D78DC8564</string>
<string>91C543BF-7BD8-4E3A-B493-AE572C5472A0</string>
<string>856B8A7A-86FA-4424-B4D9-3D57D5C3E590</string>
<string>92E54811-6041-4BF8-B808-918B8C11F1D9</string>

0 comments on commit 6efc35f

Please sign in to comment.