Created
March 3, 2016 20:51
-
-
Save defbyte/fed0a0707170d24e8136 to your computer and use it in GitHub Desktop.
Atom Rails Model snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'.source.ruby': | |
'Rails Model Scaffold': | |
'prefix': 'rmodel' | |
'body': """ | |
class $1 < ActiveRecord::Base | |
# --------------------------------------------------------------------------- | |
# Scopes | |
# --------------------------------------------------------------------------- | |
# --------------------------------------------------------------------------- | |
# Search | |
# --------------------------------------------------------------------------- | |
# --------------------------------------------------------------------------- | |
# Callbacks | |
# --------------------------------------------------------------------------- | |
# --------------------------------------------------------------------------- | |
# Associations | |
# --------------------------------------------------------------------------- | |
# --------------------------------------------------------------------------- | |
# Validations | |
# --------------------------------------------------------------------------- | |
# --------------------------------------------------------------------------- | |
# Instance Methods | |
# --------------------------------------------------------------------------- | |
# --------------------------------------------------------------------------- | |
# Tolaria Invocation | |
# --------------------------------------------------------------------------- | |
manage_with_tolaria using: { | |
icon: "$2", | |
category: "$3", | |
priority: $4, | |
permit_params: [ | |
$5 | |
] | |
} | |
# --------------------------------------------------------------------------- | |
# Private Methods | |
# --------------------------------------------------------------------------- | |
end | |
""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment