Dependency diagram does not show relationships correctly

Attached herewith is a screenshot with the model files:
If you look at the relationship between BusinessStatus and Business models, you will see that it is displayed as a problem.  That is: Redmine cannot infer the relationship from model code, but it is correct as shown below:

class Business < ActiveRecord::Base

  has_many :comments, :as => :commentable, rder => "created_at DESC"

  belongs_to :user
  belongs_to :business_status
  has_many :vehicles
  has_many :buildings
  ....

end

class BusinessStatus < ActiveRecord::Base
  has_many :businesses
  attr_accessible :name
  validates_presence_of :name, :message => "^You must specify a business status name."
end

If you look at the screenshot, you will see that I have that issue all over the place, i.e., it shows up in the relationship between business and (vehicles and buildings) too.  Is there something I am missing or is it Redmine?  I am attaching the model code for Business and BusinessStatus so that you can look at it in detail.

Thanks.

Bharat



Attachment(s):
business_status.rb
business.rb
Screenshot.png
6 comments
Comment actions Permalink

I would like to see the Rubymine team accept this as a challenge.  At least be open to in answering quetions like this.  I have seen your Video where you show how to fix broken relationships between models in a model dependency diagram.  As best as I know, the relationships have been declared correctly in my models.  And they work fine in practice.  Why then the highly touted Dependency diagram not able to handle it?
I had submitted the entire code to your lead developer during the early access program but it went unanswered.  At least be open enough to acknowledge if you have a problem.  On the other hand if I am doing something wrong then please let me know, I will correct it.  You are charging monies for your product or at least planning to.  If your support is poorer than products that are free, e.g., Netbeans, then it becomes very difficult to justify this purchase much less recommend it to someone.
This is a constructive critique meant to be taken in the same spirit.
Bharat

0
Comment actions Permalink

Hello Bharat,

I beg your pardon that you had to wait long time for our reply. You are right we are interested in feedback and in particular in bug reports for nontrivial problems. I don't see any mistakes in your code and now I'm looking in source code to find why the association was highlighted as error.

0
Comment actions Permalink

Thank you Roman.  I appreciate it.  I would like to purchase RubyMine if things are resolved in an expedient manner.  I have very fond memories of using Idea Intellij approx. 5-6 years ago when I was at Sovereign Bank.  It was without a doubt one of the best software tools that I have ever used.  I am looking for the same kind of quality in Rubymine, no, better

0
Comment actions Permalink

I've checked it - it's RubyMine bug (http://www.jetbrains.net/jira/browse/RUBY-3935). Bug affects all belongs_to associations which name ends with "s" or "es". Fixed version will be available in next RubyMine EAP (probably after RailsConf, during week 11-17 may 2009). As a quick fix you can specify Model class manually, e.g.

belongs_to :business_status, :class_name => BusinessStatus

0
Comment actions Permalink

Thank you Roman for looking into it and suggesting an alternative.  I will wait for the fix to come up around 11-17 May.  Will the automatic Browser launch issue for Rails 2.3.2 be fixed in that as well?
Bharat

0

Please sign in to leave a comment.