Project

General

Profile

Where is issue_url() defined?

Added by Rich Kay almost 4 years ago

I'm familiarizing myself with the redmine source. I see several link formation helpers refer to a method called "issue_url()" but I can't find issue_url() defined in the redmine source.

Can anyone point me to where that's defined? Thanks much.


Replies (4)

RE: Where is issue_url() defined? - Added by Mischa The Evil almost 4 years ago

Rich Kay wrote:

Can anyone point me to where that's defined?

Well, it isn't defined in the Redmine source directly. Instead it's a dynamic URL helper method that is provided by the Ruby on Rails framework.
Check out the Rails guide on routing for more information.

Edit by Mischa The Evil:
Just a little convenience tip: source documentation can best be inspected using docs generated by RDoc or YARD (Redmine core provides a rake task for the latter [i.e. "rake yard"]). These also provide out-of-the-box search functionality.

RE: Where is issue_url() defined? - Added by Rich Kay almost 4 years ago

Oh, so it sounds like the "issue" in issue_url is a verb, not a noun. That would clears up that mystery.

Thanks,
Rich

RE: Where is issue_url() defined? - Added by Mischa The Evil almost 4 years ago

Rich Kay wrote:

Oh, so it sounds like the "issue" in issue_url is a verb, not a noun.

No, the "issue" in issue_url is a noun. It refers to the singular form of the (Redmine core) issues resource (source:/trunk/config/routes.rb@19827#L188). Similar helper methods exist for all other resources (as in REST resources) like e.g. projects, users, etc., such that methods like project_url and user_url (and their *_path companions) exist too.

Again, I recommend to read the previously linked Rails guide carefully.

HTH, Mischa.

RE: Where is issue_url() defined? - Added by Rich Kay almost 4 years ago

Yeah, I'm a newbie with Rails and redmine (obviously I guess), but overall, I'm thrilled with the platform. I'll dig into the routes guide more deeply.

Rich

    (1-4/4)