-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sinatra apps without views: NoMethodError #96
Comments
This PR is a simpler approach to what was proposed in #95, and makes the interface consistent across all of the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If a Sinatra app doesn't have a
views/
folder, the methoddetect_views()
returnsnil
instead of an empty array, unlike the otherdetect_*()
methods in sinatra.rb.https://github.com/codesake/codesake-dawn/blob/master/lib/codesake/dawn/sinatra.rb#L119
This causes a NoMethodError on line 37, which expects a valid
@views
array.The simplest solution that doesn't require adding conditionals (or complicating existing ones) is simply to add a default empty array to the end of
detect_views()
on line 120.The text was updated successfully, but these errors were encountered: