Module: KirguduBase::Models::BasicManagementUrls
- Defined in:
- app/helpers/kirgudu_base/models/basic_management_urls.rb
Instance Method Summary collapse
- #portal_delete_url ⇒ Object
- #portal_edit_url ⇒ Object
- #portal_purge_url ⇒ Object
- #portal_show_url ⇒ Object
- #portal_update_url ⇒ Object
Instance Method Details
#portal_delete_url ⇒ Object
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'app/helpers/kirgudu_base/models/basic_management_urls.rb', line 65 def portal_delete_url allow_delete = true if self.class.respond_to?(:action_allowed?) allow_delete = self.class.action_allowed?(:delete) end if allow_delete = self.get_parent_ids if self.respond_to?(:get_parents) = {} unless && .is_a?(Hash) [:controller] = ::ChupakabaraTools::ClassHelper.controller_full_path_underscore(self.class.management_controller) [:action] = "destroy" [:id] = self.id [:only_path] = true Rails.application.routes.url_helpers.url_for() end end |
#portal_edit_url ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'app/helpers/kirgudu_base/models/basic_management_urls.rb', line 7 def portal_edit_url allow_edit = true if self.class.respond_to?(:action_allowed?) allow_edit = self.class.action_allowed?(:edit) end if allow_edit = self.get_parent_ids if self.respond_to?(:get_parents) = {} unless && .is_a?(Hash) [:controller] = ::ChupakabaraTools::ClassHelper.controller_full_path_underscore(self.class.management_controller) [:action] = "edit" [:id] = self.id [:only_path] = true Rails.application.routes.url_helpers.url_for() end end |
#portal_purge_url ⇒ Object
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'app/helpers/kirgudu_base/models/basic_management_urls.rb', line 84 def portal_purge_url allow_delete = true if self.class.respond_to?(:action_allowed?) allow_delete = self.class.action_allowed?(:purge) end if allow_delete = self.get_parent_ids if self.respond_to?(:get_parents) = {} unless && .is_a?(Hash) [:controller] = ::ChupakabaraTools::ClassHelper.controller_full_path_underscore(self.class.management_controller) [:action] = "purge" [:id] = self.id [:only_path] = true Rails.application.routes.url_helpers.url_for() end end |
#portal_show_url ⇒ Object
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'app/helpers/kirgudu_base/models/basic_management_urls.rb', line 45 def portal_show_url allow_show = true if self.class.respond_to?(:action_allowed?) allow_show = self.class.action_allowed?(:show) end if allow_show = self.get_parent_ids if self.respond_to?(:get_parents) = {} unless && .is_a?(Hash) [:controller] = ::ChupakabaraTools::ClassHelper.controller_full_path_underscore(self.class.management_controller) [:action] = "show" [:id] = self.id [:only_path] = true Rails.application.routes.url_helpers.url_for() end end |
#portal_update_url ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'app/helpers/kirgudu_base/models/basic_management_urls.rb', line 26 def portal_update_url allow_edit = true if self.class.respond_to?(:action_allowed?) allow_edit = self.class.action_allowed?(:edit) end if allow_edit = self.get_parent_ids if self.respond_to?(:get_parents) = {} unless && .is_a?(Hash) [:controller] = ::ChupakabaraTools::ClassHelper.controller_full_path_underscore(self.class.management_controller) [:action] = "update" [:id] = self.id [:only_path] = true Rails.application.routes.url_helpers.url_for() end end |