日付のフォーマットを変える
# Methods added to this helper will be available to all templates in the application. module ApplicationHelper def format_time(time) time.strftime(ActiveSupport::CoreExtensions::Time::Conversions::TIME_FORMATS[:default]|| '%m/%d/%Y %I:%M %p') #time.strftime("%m/%d/%Y %I:%M %p") end def format_date(date) date.strftime(ActiveSupport::CoreExtensions::Date::Conversions::DATE_FORMATS[:default]|| '%Y-%m-%d') #date.strftime("%m/%d/%Y") end end