| Class | ApplicationController |
| In: |
app/controllers/application.rb
|
| Parent: | ActionController::Base |
Filters added to this controller apply to all controllers in the application. Likewise, all the methods added will be available for all controllers.
Formats the date to dd/mm without leading zeroes
# File app/controllers/application.rb, line 12
12: def format_date_remove_zeroes(date_to_format)
13: date_num= date_to_format.strftime('%d').to_i
14: month_num = date_to_format.strftime('%m').to_i
15: formatted_date=date_num.to_s+"/"+month_num.to_s
16: end