Bug #4557
closed"Undefined Method" is raised in FiltersHelper#resource_path when resource is defined in a namespaced plugin
Description
Backtrace:
ActionView::Template::Error (undefined method `foreman_setup/provisioners_path' for #<#<Class:0x007fd081927030>:0x007fd084404cd0>):
45:
46: <%= autocomplete_f f, :search,
47: :disabled => f.object.unlimited?,
48: :path => resource_path(f.object.resource_type), :control_group_id => 'search_group' %>
49: </div>
50: </div>
51:
app/helpers/filters_helper.rb:20:in `resource_path'
Updated by Dominic Cleal almost 11 years ago
- Blocks Tracker #4552: New permissions/authorization system issues added
Updated by Dominic Cleal almost 11 years ago
- Has duplicate Bug #4554: Editing filter on namespaced resource type fails with undefined method `foreman_setup/provisioners_path' added
Updated by Marek Hulán almost 11 years ago
I thought it was resolved in katello patch, here's the snippet that should do the trick
object_path = f.object.resource_type.pluralize.underscore
if object_path.include?('/')
prefix, suffix = object_path.split('/', 2)
send(prefix).send(suffix + '_path')
else
send("#{object_path}_path")
end
a FilterHelper#resource_path (app/helpers/filters_helper.rb) should be adapted to this snippet, that should fix it
Updated by Anonymous almost 11 years ago
- Status changed from Assigned to Ready For Testing
Updated by Dominic Cleal almost 11 years ago
- Has duplicate Bug #4603: RBAC UI - plugin permissions not properly found added
Updated by Dominic Cleal almost 11 years ago
- Translation missing: en.field_release set to 4
Updated by Anonymous almost 11 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 35da973fa7594c1e99c518e66a05f43a5068bdde.