[Rails] Radio buttons & required boolean attributes

2015-08-19 Thread Lazarus Lazaridis
Hello everybody, I wrote this post about radio buttons for required boolean attributes. How do you find this approach? How do you handle the case? http://www.arubystory.com/2015/02/mind-the-gap-part-1.html Thanks, Lazarus -- You r

Re: [Rails] Radio buttons in bootstrap

2014-03-01 Thread muchira k.
Beautiful! That workedthx! On Sat, Mar 1, 2014 at 5:56 PM, Walter Lee Davis wrote: > > On Mar 1, 2014, at 9:13 AM, bertly_the_coder wrote: > > > Hi guys, > > > > I'm using Bootstrap 3 with Rails 4 and having a bit of trouble aligning > my horizontal radio-buttons. In my HAML I have this lin

Re: [Rails] Radio buttons in bootstrap

2014-03-01 Thread Walter Lee Davis
On Mar 1, 2014, at 9:13 AM, bertly_the_coder wrote: > Hi guys, > > I'm using Bootstrap 3 with Rails 4 and having a bit of trouble aligning my > horizontal radio-buttons. In my HAML I have this line > > .row >.col-md-12 > =f.association :search_engine, as: :radio_buttons, item_wra

[Rails] Radio buttons in bootstrap

2014-03-01 Thread bertly_the_coder
Hi guys, I'm using Bootstrap 3 with Rails 4 and having a bit of trouble aligning my horizontal radio-buttons. In my HAML I have this line .row .col-md-12 =f.association :search_engine, as: :radio_buttons, item_wrapper_class: 'radio-inline', label: false but when I load the page,

Re: [Rails] radio buttons form in ruby on rails

2013-06-15 Thread Hassan Schroeder
On Sat, Jun 15, 2013 at 4:50 AM, @ddy wrote: > Is this a correct way to read info from radio buttons. > Please help, it is not working. Is the syntax correct? It's horrible markup and very un-Ruby/Rails-ish code, but the key point is: what EXACTLY do you mean by "not working"? Is your controlle

[Rails] radio buttons form in ruby on rails

2013-06-15 Thread @ddy
Hi there! I m using this form: <%= form_for(:usage, :url=> {:action =>'getResults'}) do |f| %> Select search criteria : <%= f.radio_button :filter, 'uni'%> For Unicast only <%= f.radio_button :filter, 'multi' %> For Multicasts only <%= f.radio_button :filter,

Re: [Rails] Radio buttons show false when clicked

2013-03-07 Thread Colin Law
On 7 March 2013 12:27, NN Dodhia wrote: > Hi i have this code : > <%= f.input :xyz, :label => "Select a number:",:collection => > ["twenty.","forty"], > :as => :radio%> Can you point to the docs for the use of :as => :radio in that way, I can't seem to find it. > > where xyz is a boolean field

Re: [Rails] Radio buttons show false when clicked

2013-03-07 Thread Gautam Pai
On Mar 7, 2013 5:58 PM, "NN Dodhia" wrote: > > Hi i have this code : > <%= f.input :xyz, :label => "Select a number:",:collection => ["twenty.","forty"], > :as => :radio%> > > where xyz is a boolean field, so when i submit my form and check in the database it shows the selection as false even th

[Rails] Radio buttons show false when clicked

2013-03-07 Thread NN Dodhia
Hi i have this code : <%= f.input :xyz, :label => "Select a number:",:collection => ["twenty.","forty"], :as => :radio%> where xyz is a boolean field, so when i submit my form and check in the database it shows the selection as false even though i've selected a radio button and there's also a

Re: [Rails] Radio buttons in scaffold

2012-04-20 Thread Colin Law
On 19 April 2012 22:07, Padmoja Roy wrote: > ... > Showing /home/vmuser/workspace/trial-9/app/views/values/_form.html.erb > where line #22 raised: > > /home/vmuser/workspace/trial-9/app/views/values/_form.html.erb:22: > syntax error, unexpected tIDENTIFIER, expecting ')' > ...adio_button :lname, '

[Rails] Radio buttons in scaffold

2012-04-19 Thread Padmoja Roy
I was trying to create a radio button in scaffold form but got error here is the form codes- <%= form_for(@value) do |f| %> <% if @value.errors.any? %> <%= pluralize(@value.errors.count, "error") %> prohibited this value from being saved: <% @value.errors.full_messages.ea

Re: [Rails] Radio buttons

2011-12-13 Thread Walter Lee Davis
On Dec 13, 2011, at 1:11 AM, Reva wrote: > hi > i m new to rails and i m facinga problem with radio buttons. i need to > create a portal with multiple choice question. i m using html here. > once i submit the answer the page is getting refreshed and the > selected radio button is also refreshed.

[Rails] Radio buttons

2011-12-13 Thread Reva
hi i m new to rails and i m facinga problem with radio buttons. i need to create a portal with multiple choice question. i m using html here. once i submit the answer the page is getting refreshed and the selected radio button is also refreshed. and is show a page with no radio button selected.

Re: [Rails] Radio buttons

2011-11-24 Thread Colin Law
On 24 November 2011 12:44, Guru R. wrote: > I am new to ruby on rails.i need to create a page with a question and > multiple choice answers with radio button to answer .i ve stored the > database in a table with one column ha the question and the other four > with answers. i ve to populate the fif

[Rails] Radio buttons

2011-11-24 Thread Guru R.
I am new to ruby on rails.i need to create a page with a question and multiple choice answers with radio button to answer .i ve stored the database in a table with one column ha the question and the other four with answers. i ve to populate the fifth column with the answer selected with the radio b

Re: [Rails] Radio buttons and :onchange

2010-04-21 Thread Colin Law
On 21 April 2010 17:12, Shandy Nantz wrote: > Hi all, > > I have three radio buttons that when clicked are supposed to show a > particular div and hide other divs, pretty straight forward. But what I > have noticed is that while the code works perfectly in Chrome and > Firefox it breaks down in IE

[Rails] Radio buttons and :onchange

2010-04-21 Thread Shandy Nantz
Hi all, I have three radio buttons that when clicked are supposed to show a particular div and hide other divs, pretty straight forward. But what I have noticed is that while the code works perfectly in Chrome and Firefox it breaks down in IE 7 & 8. Here is the code: <%= radio_button_tag( :synch,

[Rails] radio buttons on edit/update form

2009-10-15 Thread zambezi
Radio buttons in an edit/update form do not display the underlying data (all radio buttons are displayed unchecked) although any changes made through these contols are updated. <%= f.radio_button(:sex, 'female', :checked => "unchecked") %> <%= f.radio_button(:sex, 'male',

[Rails] Radio buttons for arrays

2009-07-23 Thread Ritvvij
Hi, Presently I am using drop down with following function <%= task_form.collection_select :task_type, @task_types, :id, :display_value %> It basically gives me ability to have drop down based on an array of objects I am looking for a similar radio buttons function which will allow me to only gi

[Rails] Radio buttons in forms

2009-04-28 Thread Demec
<% form_for @group do |g| %> To create a new group please complete the details below Group Name <%= g.text_field :name %> Public <%= g.radio_button :type, "public" %> Private <%= g.radio_button :type, "private" %>

[Rails] radio buttons?

2009-04-15 Thread Dave Smith
if i got a couple of radio buttons on my form that i want to use a published_at field rather than a boolean field how would i go about this? I know that if i'm using a boolean i can do the following. <%= f.radio_button :published_at, true %> Yes <%= f.radio_button :published_at, false %> No but

[Rails] radio buttons and whatnot

2009-01-13 Thread Dave Smith
Hey guys, I got a statuses model which holds all my applications statuses, they are differentiated by their status type. In my application I have some invoices that I want to be able to set their invoice.status using radio buttons (which are created in my view from the statuses table). Does any

[Rails] Radio buttons are not mutually exclusive in Edit page

2008-11-20 Thread Satya Prusty
I have two emails for a contact. The first email is primary.While saving a new contact I can only set one radio button for primary, but in edit page the primary radio button can be set for both emails(not mutually exclusive) View <% for email in @contact.emails %> <% fields_for "contact[e