Skip to content

Commit

Permalink
Nil check
Browse files Browse the repository at this point in the history
  • Loading branch information
martent committed Jun 1, 2018
1 parent a7f16b2 commit 6d832fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion app/models/company.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def present_bookings
end

def active_permit?
permit_starts_at <= Date.today && permit_ends_at >= Date.today
permit_starts_at.present? && permit_ends_at.present? &&
permit_starts_at <= Date.today && permit_ends_at >= Date.today
end
end
3 changes: 1 addition & 2 deletions public/500.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
</style>
</head>
<body>
<h1>Vi är ledsna, ett serverfel uppstod</h1>
<p>Försök åter om en liten stund</p>
<h1>Ett serverfel uppstod</h1>
<p class="code">[500]</p>
</body>
</html>

0 comments on commit 6d832fc

Please sign in to comment.