Bug #7613
Updated by Dominic Cleal almost 10 years ago
I am developing a Foreman plugin that adds ability to keep track of Image Stores, such as Image Factory. I would like the user to be able to search images. As a result I have made a searcheable list page. However, I get the following error when I try to render the page ... Showing /home/dkliban/foreman/app/views/common/_searchbar.html.erb where line #18 raised: undefined method `new_bookmark_path' for #<#<Class:0x00000008255078>:0x00000009c4c2b0> Extracted source (around line #18): 15: <% end %> 16: <li class="divider"></li> 17: <li><%= link_to_function _('Bookmark this search'), "$('#bookmarks-modal').modal();", 18: {:id => "bookmark", :"data-url"=> new_bookmark_path(:kontroller => controller_name)}%></li> 19: </ul> 20: </span> 21: </div> I am able to fix this problem by applying the following diff to Foreman <pre> diff --git a/app/views/common/_searchbar.html.erb b/app/views/common/_searchbar.html.erb index 2ff07ce..0f61638 100644 --- a/app/views/common/_searchbar.html.erb +++ b/app/views/common/_searchbar.html.erb @@ -15,7 +15,7 @@ <% end %> <li class="divider"></li> <li><%= link_to_function _('Bookmark this search'), "$('#bookmarks-modal').modal();", - {:id => "bookmark", :"data-url"=>new_bookmark_path(:kontroller => controller_name)}%></li> + {:id => "bookmark", :"data-url"=>main_app.new_bookmark_path(:kontroller => controller_name)}%></li> </ul> </span> </div> </pre> Can this diff be permanently added?