-
Notifications
You must be signed in to change notification settings - Fork 598
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
Can't annotate models using memoization. #14
Comments
Can you provide a sample model? |
Looks like you're loading the class twice. |
I have the same problem with Rails 3.0.5 & Ruby 1.9.2. |
I'll see what I can do. |
Great, thanks! |
+1 for this |
+1 |
+1. Still having issues with Rails 3.0.10, Ruby 1.8.7-p302, and annotate 2.4.0. |
+1. Same problem. |
Thanks @eagleas. I've merged your fix. If the problem persists for anyone, please reopen this ticket. |
I still have this problem, installed gem with |
* ctran: (23 commits) Inserting newline requires double-quoted string Annotation position defaulted to 'before'. Bugfix: annotate_models.rake uses string instead of symbol. include ActiveSupport to finish build ctran#45 include lib specs specify :rubygems source in Gemfile for Travis Gemfile for dependencies for Travis CI rake make the specs pass (one pending) fix column pattern Allow task loading from Rakefile for gems (plugin installation already auto-detects). Add skip_on_db_migrate option as well for people that don't want it. Fix options parsing to convert strings to proper booleans. Change annotate to use options hash instead of ENV. Update README.rdoc to mention Fabrication support Add support for Fabrication fabricators We had stripped the trailing newlines from our Schema Information section. This small fix supports that case. rake task is 'build', not 'gem' match indexes and column options too when comparing annotation headers Leave magic encoding comment intact Fixes issue ctran#14 - RuntimeError: Already memoized Count a model as 'annotated' if any of its tests/fixtures are annotated Implement FactoryGirl (ctran#47) fix gemspec and get rspecs partly working again ... Conflicts: Gemfile Rakefile VERSION.yml annotate.gemspec lib/tasks/annotate_models.rake spec/annotate/annotate_models_spec.rb spec/spec_helper.rb
If you're using memoize inside of an AR model, you will receive the following error during annotation.
Unable to annotate [MODEL].rb: #<RuntimeError: Already memoized [METHOD]>
The text was updated successfully, but these errors were encountered: