This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
orbit-4-1/app/helpers/admin/categories_helper.rb

15 lines
382 B
Ruby
Raw Normal View History

module Admin::CategoriesHelper
include ActionView::Helpers::UrlHelper
def show_permission_link(category)
type = 'submit'
oa = category.get_object_auth_by_title(type)
if oa.nil?
category.object_auths.new(title: type ).save
oa = category.get_object_auth_by_title(type)
end
link_to t(:category_auth), admin_object_auth_ob_auth_path(oa)
end
end