Module: CurrentDate::ViewHelpers

Defined in:
lib/current_date/view_helpers.rb

Instance Method Summary collapse

Instance Method Details

#current_date(format = '%m/%d/%Y') ⇒ Object

<%= current_date(‘Now: %m/%d/%Y’) %>



4
5
6
# File 'lib/current_date/view_helpers.rb', line 4

def current_date(format='%m/%d/%Y')
    Time.current.strftime(format)
end