I have a Rails 4 application and I have created a Template model. I've got a problem when I try to fetch some data from that model in a view, for example:
<%= Template.where(:key_name => 'email_layout').first.content %>
ActionView::Template::Error: undefined method `where' for ActionView::Template:Class
What can I do?
Thank you in advance.