Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mayinx/cabde3eb0d53315844e220abf69bcb1f to your computer and use it in GitHub Desktop.
Save mayinx/cabde3eb0d53315844e220abf69bcb1f to your computer and use it in GitHub Desktop.
A sublime text editor snippet to quickly create a new 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
end
end]]></content>
<tabTrigger>mod</tabTrigger>
<scope>source.ruby, source.ruby.rails, source.rails</scope>
<description>Rails 4.0 Concern</description>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment