mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-12-15 01:44:19 +00:00
first commit of a million rails snippets, conditions missing, command implementation missing...
This commit is contained in:
@@ -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}"
|
||||
@@ -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}'
|
||||
9
extras/imported/rails-mode/Routes/map_resource.yasnippet
Normal file
9
extras/imported/rails-mode/Routes/map_resource.yasnippet
Normal file
@@ -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}
|
||||
10
extras/imported/rails-mode/Routes/map_resources.yasnippet
Normal file
10
extras/imported/rails-mode/Routes/map_resources.yasnippet
Normal file
@@ -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}
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user