Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Questions with grouped_selcect
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
dr.phil  
View profile  
 More options Oct 1 2012, 10:43 pm
From: "dr.phil" <dr.p...@allergyct.com>
Date: Mon, 1 Oct 2012 19:43:38 -0700 (PDT)
Local: Mon, Oct 1 2012 10:43 pm
Subject: Questions with grouped_selcect

In order to implement dynamic select menus, I would like to produce two
group select inputs. Both have problems.

The form is for the model treatment.  and medicine (many to many through a
join with a model medicine). There is a schedule

1. Treatment has a field schedule (string). I want to populate the dropdown
with the schedule.name from the schedule model group by schedule.type
- Schedule is a separate unrelated model.
- All online examples seem to group based on a relationship.
- <%= f.input :schedule, :collection => Schedule.all, :as =>
:grouped_select, :group_method => :type %> give an error undefined method
`map' for string

2. Treatment has a field for medicine ; joined many to many through
TreatmentMedicine. Medicines also have a type attribute.
- How do I create a multiselect for medicines grouped by medicine.type
(through this join),

I know these questions require some thought. Any help would be much
appreciated.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »