Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #6829: inflect_in_initializer_block.diff

File inflect_in_initializer_block.diff, 1.2 kB (added by dcmanges, 2 years ago)

set inflections before initializing routes

  • railties/environments/environment.rb

    old new  
    4141  # Make Active Record use UTC-base instead of local time 
    4242  # config.active_record.default_timezone = :utc 
    4343   
     44  # Add new inflection rules using the following format  
     45  # (all these examples are active by default): 
     46  # Inflector.inflections do |inflect| 
     47  #   inflect.plural /^(ox)$/i, '\1en' 
     48  #   inflect.singular /^(ox)en/i, '\1' 
     49  #   inflect.irregular 'person', 'people' 
     50  #   inflect.uncountable %w( fish sheep ) 
     51  # end 
     52 
    4453  # See Rails::Configuration for more options 
    4554end 
    4655 
    47 # Add new inflection rules using the following format  
    48 # (all these examples are active by default): 
    49 # Inflector.inflections do |inflect| 
    50 #   inflect.plural /^(ox)$/i, '\1en' 
    51 #   inflect.singular /^(ox)en/i, '\1' 
    52 #   inflect.irregular 'person', 'people' 
    53 #   inflect.uncountable %w( fish sheep ) 
    54 # end 
    55  
    5656# Add new mime types for use in respond_to blocks: 
    5757# Mime::Type.register "text/richtext", :rtf 
    5858# Mime::Type.register "application/x-mobile", :mobile