Project

General

Profile

Actions

Bug #4557

closed

"Undefined Method" is raised in FiltersHelper#resource_path when resource is defined in a namespaced plugin

Added by Anonymous about 10 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Users, Roles and Permissions
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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'


Related issues 3 (1 open2 closed)

Has duplicate Foreman - Bug #4554: Editing filter on namespaced resource type fails with undefined method `foreman_setup/provisioners_path'Duplicate03/05/2014Actions
Has duplicate Foreman - Bug #4603: RBAC UI - plugin permissions not properly foundDuplicate03/09/2014Actions
Blocks Foreman - Tracker #4552: New permissions/authorization system issuesNew

Actions
Actions #1

Updated by Dominic Cleal about 10 years ago

  • Blocks Tracker #4552: New permissions/authorization system issues added
Actions #2

Updated by Dominic Cleal about 10 years ago

  • Has duplicate Bug #4554: Editing filter on namespaced resource type fails with undefined method `foreman_setup/provisioners_path' added
Actions #3

Updated by Marek Hulán about 10 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

Actions #4

Updated by Anonymous about 10 years ago

  • Status changed from Assigned to Ready For Testing
Actions #5

Updated by Dominic Cleal about 10 years ago

  • Has duplicate Bug #4603: RBAC UI - plugin permissions not properly found added
Actions #6

Updated by Dominic Cleal about 10 years ago

  • translation missing: en.field_release set to 4
Actions #7

Updated by Anonymous about 10 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF