Commit 4036163b by Ngô Trung Hưng

..

parent c5eb1f47
Pipeline #811 failed with stages
in 0 seconds
......@@ -5,7 +5,7 @@ class JobController < ApplicationController
before_action :load_data_dropdown, only: :index
def index
model = Object.const_get(params[:model].capitalize)
model = params[:model].classify.constantize
obj = model.find(params[:id])
result(obj)
end
......@@ -23,3 +23,4 @@ class JobController < ApplicationController
render 'result_data'
end
end
Object.const_get('cities'.classify)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment