#<ActionView::Template::Error: undefined method `beginning_of_day' for nil:NilClass>