Lets say I wish to make a page that can query the desired object with type(string) and id(int).
/query?type=people&id=1
would fe
Try:
klass = params[:type] klass.singularize.classify.constantize.find(params[:id])
Edit:
@object = params[:type].singularize.classify.constantize.find(params[:id])