The second selector is correct. Converting it to jQuery, it's
$('input[data-radio-group="foo"]:checked').first().val();
--
Dheeraj Kumar
On Thursday 27 December 2012 at 10:50 PM, Walter Lee Davis wrote:
>
> On Dec 27, 2012, at 12:14 PM, Walter Lee Davis wrote:
>
> >
> > On Dec 27, 2012,
On Dec 27, 2012, at 12:14 PM, Walter Lee Davis wrote:
>
> On Dec 27, 2012, at 6:33 AM, Gauthier D. wrote:
>
>> Compared to "real" radio groups, I loose the ability to quickly get the
>> "group value" but I don't need that in my case.
>
> You might try this:
>
> $$('input[data-radio-gro
On Dec 27, 2012, at 6:33 AM, Gauthier D. wrote:
> Compared to "real" radio groups, I loose the ability to quickly get the
> "group value" but I don't need that in my case.
You might try this:
$$('input[data-radio-group="foo"][checked]').first().getValue();
That's Prototype, but you sh
On Dec 26, 2012, at 12:56 PM, Gauthier D. wrote:
> Samantha John wrote in post #1032986:
>> I'd recommend creating an attr_accessor for :primary on your Title
>> model.
>> In your form you could do something like:
>> f.object.roles.each do |role|
>> f.radio_button :primary, :role.id
>> f.label
I have the following:
class Title
has_many :roles
has_many :people, :through => :roles
accepts nested_attributes_for :roles
(Roles and People are also correctly defined)
In my title#edit view, I have the fields_for set up correctly and
working:
<%= f.fields_for :role
5 matches
Mail list logo