Commit 4036163b by Ngô Trung Hưng

..

parent c5eb1f47
Pipeline #811 failed with stages
in 0 seconds
...@@ -5,7 +5,7 @@ class JobController < ApplicationController ...@@ -5,7 +5,7 @@ class JobController < ApplicationController
before_action :load_data_dropdown, only: :index before_action :load_data_dropdown, only: :index
def index def index
model = Object.const_get(params[:model].capitalize) model = params[:model].classify.constantize
obj = model.find(params[:id]) obj = model.find(params[:id])
result(obj) result(obj)
end end
...@@ -23,3 +23,4 @@ class JobController < ApplicationController ...@@ -23,3 +23,4 @@ class JobController < ApplicationController
render 'result_data' render 'result_data'
end end
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