Filter select fields based on previous select fields values
Hi everyone, I'm new at RoR and I'm having a trouble in my app. The problem consists on filter a select field named "Solution", based on the others select fields above it. The attached image shows an example of these fields.
Now, what the app do is to retrieve all information from BD abaout Area, Region, Associated, Solution and populate the select fields with these data. But the user wants that, when an area, a region and an associated is selected by the user, only the solutions about that associated in that region on that area should be shown. I know there is a way to do this with AJAX and JS, but I would like to do this with ruby only, in order to keep code clean and correct. Here is my controller code which populates the select fields: