mirror of
				https://github.com/scinote-eln/scinote-web.git
				synced 2025-10-31 08:26:31 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			21 lines
		
	
	
	
		
			476 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
	
		
			476 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
| # frozen_string_literal: true
 | |
| 
 | |
| class LabelPrinterSerializer < ActiveModel::Serializer
 | |
|   include Rails.application.routes.url_helpers
 | |
|   include ApplicationHelper
 | |
| 
 | |
|   attributes :name, :display_name, :description, :type_of, :language_type, :status
 | |
| 
 | |
|   def urls
 | |
|     {
 | |
|     }
 | |
|   end
 | |
| 
 | |
|   def display_name
 | |
|     object.description.present? ? sanitize_input("#{object.name} • #{object.description}") : sanitize_input(object.name)
 | |
|   end
 | |
| 
 | |
|   def status
 | |
|     object.status.dasherize
 | |
|   end
 | |
| end
 |