Plugin: Budget Plugin

Added by Eric Davis about 10 years ago

I've officially released the Budget plugin today. You can check out the details about it on the plugin page and the release announcement on my blog. I welcome any contributors, the list of proposed features is in my Redmine and can fork my code on GitHub.

Eric

Replies (2)

RE: Plugin: Budget Plugin - Added by Chaoqun Zou about 10 years ago

Congratulatons!

I have read some of your budget plugin's code. It's educational.

And I have a question want to discuss with you.
It's the method to establish the relations with redmine core's model. I have found that you patched the core's model in the init stage. I think that it is too complex. And when I wrote my plugins, I just add a helper method in my model like this:

class book
  def holder
    find(:first, :conditions => "users.id = #{holder_id}")
  end
end

Do you think my way is reasonable? And any suggestions?
Thanks.

RE: Plugin: Budget Plugin - Added by Eric Davis about 10 years ago

And when I wrote my plugins, I just add a helper method in my model like this:

You can use that method for some parts but especially since I had to rename some methods (http://github.com/edavis10/redmine-budget-plugin/tree/master/lib/query_patch.rb#L16), I found it easier to patch the core as a module. If you can simplify the code, I'd welcome any patches.

I used this source as well as several plugins I've used to design the modules.

Eric

(1-2/2)