Skip to content

Instantly share code, notes, and snippets.

@xiy
Created June 16, 2014 19:29
Show Gist options
  • Save xiy/701b62ee4af3c53e94a9 to your computer and use it in GitHub Desktop.
Save xiy/701b62ee4af3c53e94a9 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