I'm looking for a part-time remote job.

Hire me


I'm the author of:

Mastering Redmine is a comprehensive guide with tips, tricks and best practices, and an easy-to-learn structure.

Check the book's project or

Buy the book

Social pages of the book:

By buying this book you also donate to Redmine (see this page).


Follow me:

Bug #2415

Updated by Andriy Lesyuk about 8 years ago

Before Rails 4 it was possible to override name routes in @config/routes.rb@. But, in Rails 4 this is no longer possible, see source:config/routes.rb@21#L12.

For Rails 4.1 it was possible to override the path helper method by including a custom module as follows:

<pre><code class="ruby">
Rails.application.routes.url_helpers.send(:include, IssueRouterHelper)
</code></pre>

But, in Rails 4.2 4 this does not work as well. Redmine gives the error:

<pre>
No route matches {:action⇒“new”, :controller⇒“journals”, :id⇒#<Issue id: 273, ..., project_key: “ADMIN”, issue_number: 8>} missing required keys: [:id]
</pre>

I tried different methods including something like (found such on StackOverflow):

<pre><code class="ruby">
Rails.application.routes.named_routes.url_helpers_module.send(:include, IssueRouterHelper)
</code></pre>

But, no luck.

Currently, this is fixed by overriding @app/views/issues/show.html.erb@ (see r23), but this is not a good workaround. A better one should be found! _I assume, Rails 4.3+ should have a fix for this._

Back

Terms of use | Privacy policy