I have a dialog popup comes by model name. For example,
<%= link_to pro_generic_lookup_data_path("Enr::Rds::Question2009", format: :js), data: {remote: true}, id: "question_picker" do %>
<%= f.label :Question, class: 'question_label'%>
<%= f.text_field :Question, class: 'question_label'%>
<% end %>
I have the three section like this. I am getting the value in javascript and insert into the fields inside the link_to method.
But the last section, would get the question_id and match the text in answer_column. The answer_column has the values of the Model's name like enr_rds_question_t. So, I should get this text and change into the model name like Enr::Rds::Question and make the link_to like to open the dialog popup box for answers.
I am new to RoR, So apologize for that am not able to explain clearly.
Thanks.
crude way though