Skip to content

Instantly share code, notes, and snippets.

@chriscooning
Created July 27, 2013 05:21
Show Gist options
  • Save chriscooning/6093819 to your computer and use it in GitHub Desktop.
Save chriscooning/6093819 to your computer and use it in GitHub Desktop.
timezone fix
def validate_check_in_date(entity)
if entity.user_schedule && day = entity.user_schedule.try(:department_block).try(:day)
entity.errors.add(:created_at, :not_assigned) if day.to_date != Time.zone.now.to_date
end
end
//
2013-07-27T05:13:42.997954+00:00 app[web.2]: /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require': /app/app/support/factories/check_in.rb:43: syntax error, unexpected keyword_end, expecting '}' (SyntaxError)
2013-07-27T05:13:42.997954+00:00 app[web.2]: /app/app/support/factories/check_in.rb:81: syntax error, unexpected keyword_end, expecting '}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment