Move alias_method_chain from Ruby to Rails snippets
It's technically part of Rails ActiveSupport, not base Ruby
This commit is contained in:
parent
3143461148
commit
ef63e32d61
@ -109,6 +109,8 @@ snippet dele delegate .. to
|
|||||||
delegate :${1:methods}, to: :${0:object}
|
delegate :${1:methods}, to: :${0:object}
|
||||||
snippet dele delegate .. to .. prefix .. allow_nil
|
snippet dele delegate .. to .. prefix .. allow_nil
|
||||||
delegate :${1:methods}, to: :${2:object}, prefix: :${3:prefix}, allow_nil: ${0:allow_nil}
|
delegate :${1:methods}, to: :${2:object}, prefix: :${3:prefix}, allow_nil: ${0:allow_nil}
|
||||||
|
snippet amc
|
||||||
|
alias_method_chain :${1:method_name}, :${0:feature}
|
||||||
snippet flash
|
snippet flash
|
||||||
flash[:${1:notice}] = '${0}'
|
flash[:${1:notice}] = '${0}'
|
||||||
snippet habtm
|
snippet habtm
|
||||||
|
@ -209,8 +209,6 @@ snippet defds
|
|||||||
def_delegators :${1:@del_obj}, :${0:del_methods}
|
def_delegators :${1:@del_obj}, :${0:del_methods}
|
||||||
snippet am
|
snippet am
|
||||||
alias_method :${1:new_name}, :${0:old_name}
|
alias_method :${1:new_name}, :${0:old_name}
|
||||||
snippet amc
|
|
||||||
alias_method_chain :${1:method_name}, :${0:feature}
|
|
||||||
snippet app
|
snippet app
|
||||||
if __FILE__ == $PROGRAM_NAME
|
if __FILE__ == $PROGRAM_NAME
|
||||||
${0}
|
${0}
|
||||||
|
Loading…
Reference in New Issue
Block a user