rails-erd icon indicating copy to clipboard operation
rails-erd copied to clipboard

The only_recursion_depth option does not work from rake erd.

Open leapingfrogs opened this issue 7 years ago • 1 comments

Trying to invoke:

rake erd only=Model1,Model2 only_recursion_depth=1

Results in:

Loading application environment...
Loading code in search of Active Record models...
Generating Entity-Relationship Diagram for 154 models...
rake aborted!
NoMethodError: undefined method `to_i' for :"2":Symbol
Did you mean?  to_s
/Users/ixyzzy/.gem/ruby/2.3.3/gems/rails-erd-1.5.0/lib/rails_erd/diagram.rb:129:in `generate'
/Users/ixyzzy/.gem/ruby/2.3.3/gems/rails-erd-1.5.0/lib/rails_erd/diagram.rb:119:in `create'
 #/Users/ixyzzy/.gem/ruby/2.3.3/gems/rails-erd-1.5.0/lib/rails_erd/diagram.rb:74:in `create'

Please see #266 for a potential fix.

leapingfrogs avatar Jun 06 '17 21:06 leapingfrogs

Blargh.. Another bug caused by #175

Your patch looks ok as a patch, but the long-term solution is to unify the code paths so that the behavior is identical (or at least, the messages we pass into the gem from the CLI and the rake task are identically formatted..)

kerrizor avatar Jun 06 '17 21:06 kerrizor