Re: [Rails] Re: Integers not being stored in PostgreSQL (9.3) array via simple form (Rails 4.1.1)

2014-07-03 Thread Hassan Schroeder
On Tue, Jul 1, 2014 at 10:43 AM, Chris Butcher wrote: > the user's entered value for the impact and likelihood fields to be an > integer between 0 and 100. What I would usually expect would work, something > like: > > validates_inclusion_of :impact, :in => 0..100 > > doesn't. Validation always fa

[Rails] Re: Integers not being stored in PostgreSQL (9.3) array via simple form (Rails 4.1.1)

2014-07-03 Thread Satar Wardy
thank you http://www.soran.edu.iq -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr

[Rails] Re: Integers not being stored in PostgreSQL (9.3) array via simple form (Rails 4.1.1)

2014-07-03 Thread Frederick Cheung
On Tuesday, July 1, 2014 6:43:18 PM UTC+1, Chris Butcher wrote: > Although, any help regarding validations would be much appreciated. I need > the user's entered value for the impact and likelihood fields to be an > integer between 0 and 100. What I would usually expect would work, something > l

[Rails] Re: Integers not being stored in PostgreSQL (9.3) array via simple form (Rails 4.1.1)

2014-07-01 Thread Chris Butcher
Although, any help regarding validations would be much appreciated. I need the user's entered value for the impact and likelihood fields to be an integer between 0 and 100. What I would usually expect would work, something like: validates_inclusion_of :impact, :in => 0..100 doesn't. Validation

[Rails] Re: Integers not being stored in PostgreSQL (9.3) array via simple form (Rails 4.1.1)

2014-07-01 Thread Chris Butcher
Fred, you did it! Thank you, had been stuck on this for days. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.co

[Rails] Re: Integers not being stored in PostgreSQL (9.3) array via simple form (Rails 4.1.1)

2014-06-29 Thread Frederick Cheung
On Sunday, June 29, 2014 1:19:42 PM UTC+1, Chris Butcher wrote: > I've just started working on this again after some time off. > > > In response to Fred's suggestion regarding input names, I looked into it and > found you can specify custom input names in simple form like this: > > > >   

[Rails] Re: Integers not being stored in PostgreSQL (9.3) array via simple form (Rails 4.1.1)

2014-06-29 Thread Chris Butcher
I've just started working on this again after some time off. In response to Fred's suggestion regarding input names, I looked into it and found you can specify custom input names in simple form like this: <%= f.input :impact, required: false, :error => false, input_html: { class: 'form-c

[Rails] Re: Integers not being stored in PostgreSQL (9.3) array via simple form (Rails 4.1.1)

2014-06-29 Thread Chris Butcher
've just started working on this again after some time off. In response to Fred's suggestion regarding input names, I looked into it and found you can specify custom input names in simple form like this: <%= f.input :impact, required: false, :error => false, input_html: { class: 'form-co

[Rails] Re: Integers not being stored in PostgreSQL (9.3) array via simple form (Rails 4.1.1)

2014-06-29 Thread Chris Butcher
I've just started working on this again after some time off. In response to Fred's suggestion regarding input names, I looked into it and found you can specify custom input names in simple form like this: <%= f.input :impact, required: false, :error => false, input_html: { class: 'form-co

[Rails] Re: Integers not being stored in PostgreSQL (9.3) array via simple form (Rails 4.1.1)

2014-06-25 Thread mike2r
On Wednesday, June 25, 2014 8:26:37 AM UTC-4, Frederick Cheung wrote: > > On Wednesday, June 25, 2014 10:31:01 AM UTC+1, Chris Butcher wrote: > Completed 302 Found in 73ms (ActiveRecord: 67.8ms) >> >> >> So yeah - "Unpermitted parameters: impact, likelihood". Looks relevant. I >> have done some

[Rails] Re: Integers not being stored in PostgreSQL (9.3) array via simple form (Rails 4.1.1)

2014-06-25 Thread Frederick Cheung
On Wednesday, June 25, 2014 10:31:01 AM UTC+1, Chris Butcher wrote: Completed 302 Found in 73ms (ActiveRecord: 67.8ms) > > > So yeah - "Unpermitted parameters: impact, likelihood". Looks relevant. I > have done some research into it, and it seems like one could serialise > their inputs in the mod

[Rails] Re: Integers not being stored in PostgreSQL (9.3) array via simple form (Rails 4.1.1)

2014-06-25 Thread Chris Butcher
Yes I think you are right. My logfile is unavailable for some reason ("postgres cannot access the server configuration file...") but I inspected my terminal after attempting a risk insert and this output looks exactly like what you are suggesting: Started POST "/risks" for 127.0.0.1 at 2014-06-

[Rails] Re: Integers not being stored in PostgreSQL (9.3) array via simple form (Rails 4.1.1)

2014-06-24 Thread Frederick Cheung
On Monday, June 23, 2014 10:12:04 PM UTC+1, Chris Butcher wrote: > > <%= f.input :impact, required: false, :error => false, input_html: { > class: 'form-control' } %> > > > <%= f.input :likelihood, required: false, :error => false, input_html: > { class: 'form-control' } %> > >