Skip to content
Browse files

Rails 3 type route generation

  • Loading branch information...
1 parent badddb0 commit 2a838dc89fc23642e0b7731fdb82a70c1e5e0e24 @tadast committed Dec 14, 2012
View
7 map_catch_all.sublime-snippet
@@ -1,7 +0,0 @@
-<snippet>
- <content><![CDATA[${1:map}.catch_all "*${2:anything}", controller: "${3:default}", action: "${4:error}"
-]]></content>
- <tabTrigger>mapca</tabTrigger>
- <scope>meta.rails.routes</scope>
- <description>map.catch_all</description>
-</snippet>
View
6 map_named_route.sublime-snippet
@@ -1,6 +0,0 @@
-<snippet>
- <content><![CDATA[${1:map}.${2:connect} '${3::controller/:action/:id}']]></content>
- <tabTrigger>map</tabTrigger>
- <scope>meta.rails.routes</scope>
- <description>map.named_route</description>
-</snippet>
View
8 map_resource.sublime-snippet
@@ -1,8 +0,0 @@
-<snippet>
- <content><![CDATA[${1:map}.resource :${2:resource}${10: do |${11:$2}|
- $0
-end}]]></content>
- <tabTrigger>mapr</tabTrigger>
- <scope>meta.rails.routes</scope>
- <description>map.resource</description>
-</snippet>
View
8 map_resources.sublime-snippet
@@ -1,8 +0,0 @@
-<snippet>
- <content><![CDATA[${1:map}.resources :${2:resource}${10: do |${11:$2}|
- $0
-end}]]></content>
- <tabTrigger>maprs</tabTrigger>
- <scope>meta.rails.routes</scope>
- <description>map.resources</description>
-</snippet>
View
9 map_with_options.sublime-snippet
@@ -1,9 +0,0 @@
-<snippet>
- <content><![CDATA[${1:map}.with_options ${2:controller}: '${3:thing}' do |${4:$3}|
- $0
-end
-]]></content>
- <tabTrigger>mapwo</tabTrigger>
- <scope>meta.rails.routes</scope>
- <description>map.with_options</description>
-</snippet>
View
6 routes_resource_only.sublime-snippet
@@ -0,0 +1,6 @@
+<snippet>
+ <content><![CDATA[resources :${1:res_name}, only: [:${2:index}]]]></content>
+ <tabTrigger>reso</tabTrigger>
+ <scope>meta.rails.routes</scope>
+ <description>resources :name, only: [:actions]</description>
+</snippet>
View
6 routes_resources.sublime-snippet
@@ -0,0 +1,6 @@
+<snippet>
+ <content><![CDATA[resources :${1:res_name}]]></content>
+ <tabTrigger>res</tabTrigger>
+ <scope>meta.rails.routes</scope>
+ <description>resources :resource_name</description>
+</snippet>
View
8 routes_resources_block.sublime-snippet
@@ -0,0 +1,8 @@
+<snippet>
+ <content><![CDATA[resources :${1:res_name} do
+ $2
+end]]></content>
+ <tabTrigger>resd</tabTrigger>
+ <scope>meta.rails.routes</scope>
+ <description>resources with an empty params block</description>
+</snippet>
View
10 routes_resources_collection_block.sublime-snippet
@@ -0,0 +1,10 @@
+<snippet>
+ <content><![CDATA[resources :${1:res_name} do
+ collection do
+ ${2:get} :${3:action}
+ end
+end]]></content>
+ <tabTrigger>resdc</tabTrigger>
+ <scope>meta.rails.routes</scope>
+ <description>resources with a custom collection block</description>
+</snippet>
View
10 routes_resources_member_block.sublime-snippet
@@ -0,0 +1,10 @@
+<snippet>
+ <content><![CDATA[resources :${1:res_name} do
+ member do
+ ${2:get} :${3:action}
+ end
+end]]></content>
+ <tabTrigger>resdm</tabTrigger>
+ <scope>meta.rails.routes</scope>
+ <description>resources with a custom member block</description>
+</snippet>

0 comments on commit 2a838dc

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