Skip to content

Instantly share code, notes, and snippets.

@Justin-lu
Created June 27, 2015 06:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save Justin-lu/156bd4a1cba1c507e485 to your computer and use it in GitHub Desktop.
Save Justin-lu/156bd4a1cba1c507e485 to your computer and use it in GitHub Desktop.
Rails Concern
<snippet>
<content><![CDATA[module ${1:${TM_FILENAME/(?:\A|_)([A-Za-z0-9]+)(?:\.rb)?/(?2::\u$1)/g}}
extend ActiveSupport::Concern
included do
$2
include InstanceMethods
end
module ClassMethods
$3
end
module InstanceMethods
$4
end
end]]></content>
<tabTrigger>concern</tabTrigger>
<scope>source.ruby, source.ruby.rails, source.rails</scope>
<description>Rails Concern</description>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment