I have a string in my controller that I want to make into a model name.
EG:
Class LlamaController < ApplicationController
def addsomething
model = params[:model_name]
# Here, I would like to take the string in model and use it as a
Model
@foo = Model.new
end
end
I have a string in my controller that I want to make into a model name.
EG:
Class LlamaController < ApplicationController
def addsomething
model = params[:model_name]
# Here, I would like to take the string in model and use it as a
Model
@foo = Model.new
end
end