Last active
August 29, 2015 13:57
-
-
Save eval/9410525 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Usage: | |
# $ rails new blog -m https://gist.githubusercontent.com/eval/9410525/raw/template.rb | |
annotate_version = ask("What annotate version should I bundle? [2.6.2]") | |
gem 'annotate', annotate_version.presence || '2.6.2' | |
generate(:model, "person", "name:string") | |
inject_into_class 'app/models/person.rb', 'Person', " A = 1\n" | |
rake "db:migrate" | |
run "bundle exec annotate" |
This file contains hidden or 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
/Users/gert/tmp/annotate-issue/blog/app/models/person.rb:2: warning: already initialized constant Person::A | |
/Users/gert/tmp/annotate-issue/blog/app/models/person.rb:2: warning: previous definition of A was here | |
Annotated (1): Person |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment