lib/scaffolding_extensions/helper.rb
# Returns an autocompleting text box, or a select box displaying the records for the associated model that
# are not already associated with this record.
Returns an autocompleting text box, or a select box displaying the records for the associated model that
are not already associated with this record.
Returns an autocompleting text box or a select box displaying the records for the associated model that are not already associated with this record .
def scaffold_habtm_ajax_tag(id, record, model_name, association)
        klass = record.class
        if klass.scaffold_association_use_auto_complete(association)
          scaffold_text_field_tag_with_auto_complete(id, model_name, association)
        else
          scaffold_select_tag(id, klass.scaffold_unassociated_objects(association, record, :session=>scaffold_session))
        end
      end
def scaffold_habtm_ajax_tag ( id , record , model_name , association ) klass = record . class if klass . scaffold_association_use_auto_complete ( association ) scaffold_text_field_tag_with_auto_complete ( id , model_name , association ) else scaffold_select_tag ( id , klass . scaffold_unassociated_objects ( association , record , :session => scaffold_session ) ) end end
Returns an autocompleting text box, or a select box displaying the records for the associated model that
are not already associated with this record.
Returns an autocompleting text box or a select box displaying the records for the associated model that are not already associated with this record .
id
record
model_name
association