Use lambda in scopes for rails snippets
This commit is contained in:
parent
34ead4e3bf
commit
8c2ad98d54
@ -798,7 +798,7 @@ snippet ru
|
|||||||
snippet rxml
|
snippet rxml
|
||||||
render :xml => ${1:text to render}
|
render :xml => ${1:text to render}
|
||||||
snippet sc
|
snippet sc
|
||||||
scope :${1:name}, :where(:@${2:field} => ${3:value})
|
scope :${1:name}, -> { where(${2:field}: ${3:value}) }
|
||||||
snippet sl
|
snippet sl
|
||||||
scope :${1:name}, lambda do |${2:value}|
|
scope :${1:name}, lambda do |${2:value}|
|
||||||
where("${3:field = ?}", ${4:bind var})
|
where("${3:field = ?}", ${4:bind var})
|
||||||
|
Loading…
Reference in New Issue
Block a user