[Rails] Help on getting multiple answers on a polls app

2015-12-07 Thread João Belo
Hello community, I'm working on a polls app and the the user would answer to 3 types of questions: Open answers; Multiple Choice with only one option to select (radio buttons); Multiple Choice with many options to select (checkboxes). i've already done the first and the second type of question,

Re: [Rails] search not working right

2015-12-07 Thread Colin Law
On 7 December 2015 at 17:34, fugee ohu wrote: >>> Where did you see it posted? Have you still got the link? >>> Colin > > > http://www.korenlc.com/creating-a-simple-search-in-rails-4/ If you read the comments you will see that others have pointed out the error, though why it has not been correct

Re: [Rails] search not working right

2015-12-07 Thread fugee ohu
>> Where did you see it posted? Have you still got the link? >> Colin http://www.korenlc.com/creating-a-simple-search-in-rails-4/ -- 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 email

Re: [Rails] search not working right

2015-12-07 Thread James Jelinek (shakycode)
Also in the previous code, you can do ILIKE instead of like to get rid case sensitivity. Just a FYI :) > On Dec 7, 2015, at 10:25 AM, Colin Law wrote: > > On 7 December 2015 at 16:15, fugee ohu > wrote: >> Thanks Colin, the person who posted that code sure had me fo

Re: [Rails] search not working right

2015-12-07 Thread Colin Law
On 7 December 2015 at 16:15, fugee ohu wrote: > Thanks Colin, the person who posted that code sure had me fooled, i could > have done better myself without adding code to the model It looked like an > advanced technique, who would have guessed it was so wrong Where did you see it posted? Have yo

Re: [Rails] search not working right

2015-12-07 Thread fugee ohu
Thanks Colin, the person who posted that code sure had me fooled, i could have done better myself without adding code to the model It looked like an advanced technique, who would have guessed it was so wrong On Monday, December 7, 2015 at 9:17:13 AM UTC-5, Colin Law wrote: > > On 7 December 2015

Re: [Rails] search not working right

2015-12-07 Thread Colin Law
On 7 December 2015 at 13:55, fugee ohu wrote: > when the search gets submitted it only returns results for records that had > the searched value in publicists > > from my model: > def self.search(search) > where("headline LIKE ?", "%#{search}%") > where("storyline LIKE ?", "%#{search}%") >

[Rails] search not working right

2015-12-07 Thread fugee ohu
when the search gets submitted it only returns results for records that had the searched value in publicists from my model: def self.search(search) where("headline LIKE ?", "%#{search}%") where("storyline LIKE ?", "%#{search}%") where("publicist LIKE ?", "%#{search}%") end from my cont

[Rails] Job in South Africa

2015-12-07 Thread Sapphire Recruitment
Hi, I am looking for a Lead-Senior RoR Developer 5-10 yrs exp :) Great company and great salary.:) -- 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 rubyon

Re: [Rails] font not working

2015-12-07 Thread Colin Law
On 6 December 2015 at 22:58, fugee ohu wrote: > It said to add > > config.assets.paths << Rails.root.join("app", "assets", "fonts") > to application.rb, i did that and restarted the server but it didn't help > It also said for rails 4 you don't have to do anything but place the font > file in asse

Re: [Rails] how do i add a record from the console

2015-12-07 Thread Colin Law
On 6 December 2015 at 22:04, fugee ohu wrote: > I've been trying to do it from memory something like this, but it's not > working it keeps returning rollback and false > > a=Admin.create > a=Admin.find(1) > a.email="u...@host.com" > a.password="password" > a.save It is getting rather tedious repe