15 lines
		
	
	
		
			382 B
		
	
	
	
		
			Ruby
		
	
	
	
		
		
			
		
	
	
			15 lines
		
	
	
		
			382 B
		
	
	
	
		
			Ruby
		
	
	
	
|  | 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 |