title: Rails creating a collection without an association
body: <p>What is the best and correct way to setup a simple_forms_for field that contains a collection for a select field but the values to be contained in the select need to be sourced from a model that does not have a direct association to the calling fields model?</p>
  
  <p>For example I have a simple_forms_for form like follows:</p>
  
  <pre><code>&lt;%= simple_form_for(@customer) do |f| %&gt;
  &lt;%= f.error_notification %&gt;
  &lt;fieldset&gt;
    &lt;div class="form-inputs"&gt;
      &lt;%= f.input :code, required: true %&gt;
      &lt;%= f.input :name, required: true %&gt;
      &lt;%= f.input :location, required: true %&gt;
      &lt;%= f.input :service_level %&gt;
      &lt;%= f.input :golive_date, :as =&gt; :date_picker %&gt;
      &lt;%= f.input :connection_type %&gt;
      &lt;%= f.input :service_centre %&gt;
      &lt;%= f.input :end_date, :as =&gt; :date_picker %&gt;
      &lt;%= f.input :sla %&gt;
      &lt;%= f.input :project_code %&gt;
    &lt;/div&gt;
  
    &lt;div class="form-actions"&gt;
      &lt;%= f.button :submit, :class =&gt; "btn btn-primary" %&gt;
    &lt;/div&gt;
  &lt;/fieldset&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>I want to make the :service_level field a selection field and add a collection to it, however the table that stores the lookup values is not associated with the Customer table for the form.</p>
  
  <pre><code>class Lookup &lt; ActiveRecord::Base
      validates_presence_of :name, :description
      has_many :lookup_values
      accepts_nested_attributes_for :lookup_values, :reject_if =&gt; lambda { |a| a[:content].blank? }, :allow_destroy =&gt; true
  end
  
  class LookupValue &lt; ActiveRecord::Base
      belongs_to :lookup
  end
  
  class CreateLookups &lt; ActiveRecord::Migration
    def change
      create_table :lookups do |t|
        t.string :name
        t.string :description
  
        t.timestamps
      end
    end
  end
  
  class CreateLookupValues &lt; ActiveRecord::Migration
    def change
      create_table :lookup_values do |t|
        t.integer :lookup_id
        t.string :name
        t.string :value
  
        t.timestamps
      end
    end
  end
  </code></pre>
  
  <p>I basically want to be able to populate the values of the select using the following SQL query:</p>
  
  <pre><code>select v.name||' - '||v.value
    from lookup_values v,
         lookups l
   where v.lookup_id = l.id
     and l.name = 'Service level';
  </code></pre>
  
  <p>The actual value that is saved into the :service_level field needs to be the value of v.name.</p>
  
  <p>All of the collections examples I have seen only appear to show how to create selects based on models that have an association between them, just wondering if there is an easy way to achieve this without an association.</p>