lotus/view — pull request #45 by AlfonsoUceda (2014-11-28 11:08:04+00:00)
Title: Added exception if layout isn't found

I don't know if this first approach is valid, I want to discuss with you.

I have created a tree directories:
- tmp/app/templates/posts/index.html.erb
- tmp/app/templates/default.html.erb

```ruby
require 'lotus/view'

class DefaultLayout
include Lotus::Layout

def page_title
'Title:'
end
end

module Posts
class Index
include Lotus::View
layout :default
end
end

Lotus::View.configure do
root 'tmp/app/templates'
end

Lotus::View.load!
Posts::Index.render(format: :html)
```

With this implementation all works fine, if I rename my default.index.html layout to 1234default.index.html (for example). Now I have the MissingTemplateError error created.

Is this approach correct?