Starting over, mail program sent prematurely...
2 models, Salons, Reviews
In ApplicationHelper.rb...
SALON_STATES = Salon.find(:all, :group => 'state', :select => 'state')
So in any view, I can collect...
<%= options = [[ 'Select a State', @state ]] +
ApplicationHelper::SALON_STATES.collect { |salon| [salon.state] }
select 'salon', 'state', options %>
This is OK (perhaps maybe not the best way to handle and I'm open to
suggestions)
But now, I want a list of cities in just the selected state and I can't
manage to accomplish this anywhere but in controller code which is not
very dry since I would have to replicate this code in several different
controllers (like Reviews).
@cities = Salon.find(:all, :conditions => ['active = true AND state
= ?', @state], :group => 'city', :select => 'city')
Suggestions?
Craig