-
Notifications
You must be signed in to change notification settings - Fork 609
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cannot annotate 'acronym classes' #22
Comments
What is your Rails application environment (http://localhost:3000/rails/info/properties)? |
Ruby version 1.9.2 (x86_64-darwin10.6.0) |
I have probably a related issue. I have models $ bundle exec annotate
Unable to annotate admin/known_ip.rb: #<TypeError: nil is not a symbol>
... |
bump? |
In my own project I just hacked into the source of the gem to annotate models in There was a pull request to Rails that added support for acronyms to May be I could help with implementation, but I'm not sure what'd be the best interface for that. Should it be just an CLI option that will accept list of acronyms that will be later used to perform replacement in generated class names? Should it be list of words themselves (like Btw, may be there is a different way to retrieve name of the class defined in some file other than camelizing file name. It'd be nice to find one. @ctran, care to share your thoughts on that? |
My understanding was that there is no need to retrieve the name of the class from the name of the file, it is the other way around: if a file with a class definition was not explicitly required, then its name is inferred from the name of the class. |
@alexeymuranov, have a look at |
Ok, i see, this is not nice. It would seem more reasonable to me to create some "sandbox" module, inside of it require |
This has never been an issue for me so I procrastinated a bit :-). |
If i may express my thought, there seem to be two approaches possible:
|
* release/2.6.2: v2.6.2 Add known changes for 2.6.2. Retain existing position unless :force is passed Temporarily ignore integration tests Revert "Replacing old block with new one." Change email address Add .travis.yml switch deprecated "mock" for "double" in annotate specs use general file resolution for test files as well Replacing old block with new one. Fixed gemspec files attribute migrate.rake should live in lib/tasks Always load models, since they may not be autoloaded by Rails Handle the "--exclude" option correctly, #152 and #160 FIX #157 Pump version to 2.6.1 which fixes #22
Trying to annotate a class with a string of capital letters such as
IRSDocuments
in a file named "irs_documents.rb" will fail with the message:The text was updated successfully, but these errors were encountered: