# Best approach

**URL:** <https://www.ruby-forum.com/t/best-approach/141198>\
**Category:** Rails\
**Created:** [June 23, 2008, 2:31pm UTC](https://www.ruby-forum.com/t/best-approach/141198 "2008-06-23T14:31:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jason](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/dc4da7/32.png) [@jason](https://www.ruby-forum.com/u/jason)\
**Post date:** [June 23, 2008, 2:31pm UTC](https://www.ruby-forum.com/t/best-approach/141198/1 "2008-06-23T14:31:03Z")

</div>

i have two radio buttons (member/non-member), and would like to set the  
price of adding attendees to a meeting based on the selection of the  
radio button. A shopping cart seems like over-kill for this, but other  
than that i’m stuck.

Member Type  
\<%= f.radio\_button :membertype, :class =\> ‘radio button’ %\> Member  
\<%= f.radio\_button :membertype, :class =\> ‘radio button’ %\>  
Non-Member

thank you,  
Jason

---

<div class="post-metadata">

**Author:** ![jason](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/dc4da7/32.png) [@jason](https://www.ruby-forum.com/u/jason)\
**Post date:** [June 24, 2008, 10:24pm UTC](https://www.ruby-forum.com/t/best-approach/141198/2 "2008-06-24T22:24:43Z")

</div>

On Jun 23, 2008, at 5:30 AM, jason wrote:

> i have two radio buttons (member/non-member), and would like to set  
> the  
> price of adding attendees to a meeting based on the selection of the  
> radio button. A shopping cart seems like over-kill for this, but other  
> than that i’m stuck.
> 
> Member Type  
> \<%= f.radio\_button :membertype, :class =\> ‘radio button’ %\> Member  
> \<%= f.radio\_button :membertype, :class =\> ‘radio button’ %\> Non-  
> Member

Store the value of the radio in a session – then you can reuse that  
value anywhere you need to.

– gw
