Fix setting view on resources
Merge pull request #4 from rhysrhaven/support_for_views

Fix setting view on resources