mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-12-12 08:24:18 +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: ra
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: render (action)
|
||||
## condition: "source.ruby.rails"
|
||||
# --
|
||||
render :action => "${1:action}"
|
||||
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: ral
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: render (action, layout)
|
||||
## condition: "source.ruby.rails"
|
||||
# --
|
||||
render :action => "${1:action}", :layout => "${2:layoutname}"
|
||||
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: rf
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: render (file)
|
||||
## condition: "source.ruby.rails"
|
||||
# --
|
||||
render :file => "${1:filepath}"
|
||||
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: rfu
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: render (file, use_full_path)
|
||||
## condition: "source.ruby.rails"
|
||||
# --
|
||||
render :file => "${1:filepath}", :use_full_path => ${2:false}
|
||||
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: ri
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: render (inline)
|
||||
## condition: "source.ruby.rails"
|
||||
# --
|
||||
render :inline => "${1:<%= 'hello' %>}"
|
||||
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: ril
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: render (inline, locals)
|
||||
## condition: "source.ruby.rails"
|
||||
# --
|
||||
render :inline => "${1:<%= 'hello' %>}", :locals => { ${2::name} => "${3:value}"$4 }
|
||||
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: rit
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: render (inline, type)
|
||||
## condition: "source.ruby.rails"
|
||||
# --
|
||||
render :inline => "${1:<%= 'hello' %>}", :type => ${2::rxml}
|
||||
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: rl
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: render (layout)
|
||||
## condition: "source.ruby.rails"
|
||||
# --
|
||||
render :layout => "${1:layoutname}"
|
||||
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: rn
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: render (nothing)
|
||||
## condition: "source.ruby.rails"
|
||||
# --
|
||||
render :nothing => ${1:true}
|
||||
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: rns
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: render (nothing, status)
|
||||
## condition: "source.ruby.rails"
|
||||
# --
|
||||
render :nothing => ${1:true}, :status => ${2:401}
|
||||
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: rp
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: render (partial)
|
||||
## condition: "source.ruby.rails"
|
||||
# --
|
||||
render :partial => "${1:item}"
|
||||
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: rpc
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: render (partial, collection)
|
||||
## condition: "source.ruby.rails"
|
||||
# --
|
||||
render :partial => "${1:item}", :collection => ${2:@$1s}
|
||||
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: rpl
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: render (partial, locals)
|
||||
## condition: "source.ruby.rails"
|
||||
# --
|
||||
render :partial => "${1:item}", :locals => { :${2:$1} => ${3:@$1}$0 }
|
||||
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: rpo
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: render (partial, object)
|
||||
## condition: "source.ruby.rails"
|
||||
# --
|
||||
render :partial => "${1:item}", :object => ${2:@$1}
|
||||
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: rps
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: render (partial, status)
|
||||
## condition: "source.ruby.rails"
|
||||
# --
|
||||
render :partial => "${1:item}", :status => ${2:500}
|
||||
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: rt
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: render (text)
|
||||
## condition: "source.ruby.rails"
|
||||
# --
|
||||
render :text => "${1:text to render...}"
|
||||
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: rtl
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: render (text, layout)
|
||||
## condition: "source.ruby.rails"
|
||||
# --
|
||||
render :text => "${1:text to render...}", :layout => "${2:layoutname}"
|
||||
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: rtlt
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: render (text, layout => true)
|
||||
## condition: "source.ruby.rails"
|
||||
# --
|
||||
render :text => "${1:text to render...}", :layout => ${2:true}
|
||||
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: rts
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: render (text, status)
|
||||
## condition: "source.ruby.rails"
|
||||
# --
|
||||
render :text => "${1:text to render...}", :status => ${2:401}
|
||||
@@ -0,0 +1,9 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: ru
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: render (update)
|
||||
## condition: "source.ruby.rails"
|
||||
# --
|
||||
render :update do |${2:page}|
|
||||
$2.$0
|
||||
end
|
||||
Reference in New Issue
Block a user