mirror of
				https://github.com/fspc/BikeShed-1.git
				synced 2025-10-30 16:35:35 -04:00 
			
		
		
		
	Don't attempt to show a wheel size if it's blank
This commit is contained in:
		
							parent
							
								
									85129dccaa
								
							
						
					
					
						commit
						ea79c167eb
					
				| @ -2,7 +2,12 @@ class BikeWheelSize < ActiveRecord::Base | ||||
|   belongs_to :bike | ||||
| 
 | ||||
|   def display_string | ||||
|     ["#{twmm}-#{rdmm}", "#{rdin}x#{twin}", "#{rdfr}x#{twfr}", description].join(" | ") | ||||
|     result = [] | ||||
|     result << "#{twmm}-#{rdmm}" unless twmm.blank? and rdmm.blank? | ||||
|     result << "#{rdin}x#{twin}" unless rdin.blank? and twin.blank? | ||||
|     result << "#{rdfr}x#{twfr}" unless rdfr.blank? and twfr.blank? | ||||
|     result << description unless description.blank? | ||||
|     result.join(" | ") | ||||
|   end | ||||
| 
 | ||||
|   def to_s | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user