Re: [Rails] putting options for select list in model

2018-05-02 Thread fugee ohu
On Monday, April 30, 2018 at 8:49:20 AM UTC-4, Walter Lee Davis wrote: > > > > On Apr 30, 2018, at 5:07 AM, fugee ohu > > wrote: > > > > I've been putting options for select lists in my models but I haven't > been able to do this with option/value pairs Anyone know how? The code > below does

Re: [Rails] putting options for select list in model

2018-05-02 Thread fugee ohu
On Monday, April 30, 2018 at 8:49:20 AM UTC-4, Walter Lee Davis wrote: > > > > On Apr 30, 2018, at 5:07 AM, fugee ohu > > wrote: > > > > I've been putting options for select lists in my models but I haven't > been able to do this with option/value pairs Anyone know how? The code > below does

Re: [Rails] putting options for select list in model

2018-04-30 Thread Walter Lee Davis
> On Apr 30, 2018, at 5:07 AM, fugee ohu wrote: > > I've been putting options for select lists in my models but I haven't been > able to do this with option/value pairs Anyone know how? The code below > doesn't work > > DURATION_TYPES = [['7 days', '7' ],['14 days', '14'], ['21 days','21']

[Rails] putting options for select list in model

2018-04-30 Thread fugee ohu
I've been putting options for select lists in my models but I haven't been able to do this with option/value pairs Anyone know how? The code below doesn't work DURATION_TYPES = [['7 days', '7' ],['14 days', '14'], ['21 days','21'], ['30 days','30']] validates :duration, inclusion: { in: DU