I have a plugin, built for a customer, which uses the method missing and association reflections on has_one and belongs_to to build an "automatic demeter" referencing as an extension for activerecord objects. This gives a form of delegation but without this explicity being declared.
For example, if there is a request object defined as such
class Request << ActiveRecord::Base
and a product
class Product << ActiveRecord::Base
when you have an instance of request
request.product_price will return 10
and for request=Request.new()
request.product_price will return nil.
The main reason for this plugin was to form an easy migration from long chained and error prone code that I inheritied (Rails 2.1.1 and Ruby 1.8.6), which means in most cases I can just replace the request.product.price with request.product_price or object.request_product_price (if called from another association 'object').
Long preamble over. Now for the question.
Since I control the code for this plugin, is there anyway to register it in such a way that it will allow rubymine to resolve the references? The metaprogramming is mainly a method_missing injected into ActiveRecord::Base, but currenly always highlights as a reference which can't be resolved to any valid target.