Marcelo Junior wrote:
How call model for the name, for example:
def my_action(model) model.find :all end
<%= my_action :Client %>
ps.: That has to be in String, however I call for a URL
def my_action(model) model.to_s.constantize.find :all end
Marcelo Junior wrote:
How call model for the name, for example:
def my_action(model) model.find :all end
<%= my_action :Client %>
ps.: That has to be in String, however I call for a URL
def my_action(model) model.to_s.constantize.find :all end