apeacox/panoramic — pull request #7 by alto (2012-07-24 00:49:57+00:00)
Title: Support only option

If you add

```ruby
append_view_path TemplateStorage.resolver
```

to your application controller, in order to allow database lookup for all controllers, then Rails is sending requests to the database even for layout template (which by purpose don't exist). In order to keep the number of database requests small, I introduced an optional parameter, which can be used like this

```ruby
class ApplicationController < ActionController::Base
append_view_path TemplateStorage.resolver(:only => 'use_this_prefix_only')
end
```

This make sure all template requests have to have the prefix 'use_this_prefix_only' . Otherwise the database lookup doesn't take place.