--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/fk7PY0E_DrMJ.
For more options, visit https://groups.google.com/groups/opt_out.
I am not adding any form because there is no model for this page.Only there is controller and view.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/ezhDSMxW09AJ.
Sorry for late reply...Can't we pass the param through ajax or js ?
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/KHhmZn0tpCEJ.
Somehow I did manage to pass the parameter from the dropdown to controller.But the problem is here - I am getting it as string.In Controller:----class ReportController < ApplicationControllerREPORT1 = "type =?", "Box"REPORT2 = "action = ? and type =?", "create", "Square"def reportparam = params[:audit_report] // How to convert this string to an object or static variable ? Or what is the best way to do it ?@report_data = (Audited::Adapters::ActiveRecord::Audit.where(param))// If I am passing this param, it comes as a string not as static varaible in this controller.endendIn View :----<script type="text/javascript">function audit_options(selected_audit){jQuery("#reports").load("/audit_report/report?audit_report=" + selected_audit);}</script><%= select_tag "reports_name", options_for_select([["User1", "REPORT1"], ["User2", "REPORT2"]]), :onchange =>"audit_options(this.value)" %><div id="reports"></div>
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/a6dHrQwgkoMJ.