[Rails] Re: search backwards in an one-to-many association

2016-01-13 Thread Lei Zhang
Thank you, I'll check this out. On Thursday, January 14, 2016 at 1:13:36 AM UTC+8, Jim wrote: > > On Wednesday, January 13, 2016 at 2:22:51 AM UTC-5, Lei Zhang wrote: >> >> I am going to implement a small and simple search feature in my project. >> But got a question about the scenario I have rig

Re: [Rails] search backwards in an one-to-many association

2016-01-13 Thread Lei Zhang
A for person, C for organization, which means they both have names. Like, a person called John Terry, and he is affiliated to three organizations called Chelsea FC, London Something, and UK Good Football Player. ( I made up the other two org.) So now if users want to find out some people that b

[Rails] Re: Polymorphic join table not loading with includes

2016-01-13 Thread Frederick Cheung
On Wednesday, January 13, 2016 at 9:59:34 PM UTC, Flemming Thesbjerg wrote: > > > I am trying to optimize a slow query with an includes statement. > > > But a join table with a polymorphic association seem to be preventing it. > > > The following gist tries to illustrate the issue: > https://gis

[Rails] Polymorphic join table not loading with includes

2016-01-13 Thread Flemming Thesbjerg
I am trying to optimize a slow query with an includes statement. But a join table with a polymorphic association seem to be preventing it. The following gist tries to illustrate the issue: https://gist.github.com/flemse/fdd51ff5ad29a1f57134 When running the code from the gist it will fa

Re: [Rails] Re: Character Counter is showing a negative number, not initial value

2016-01-13 Thread Colin Law
On 13 January 2016 at 20:13, David Williams wrote: > Walter Davis wrote in post #1180603: It's giving me Nan when I wrap the parseInt method around the counter. >>> >>> Check that your spelling of the attribute is correct, note the typo in the >> example. Also, if you want to be extra-careful

[Rails] Re: Character Counter is showing a negative number, not initial value

2016-01-13 Thread David Williams
Walter Davis wrote in post #1180603: >>> It's giving me Nan when I wrap the parseInt method around the counter. >> >> Check that your spelling of the attribute is correct, note the typo in the > example. Also, if you want to be extra-careful (just had to deal with > this > yesterday) you can go all

[Rails] Re: search backwards in an one-to-many association

2016-01-13 Thread Jim
On Wednesday, January 13, 2016 at 2:22:51 AM UTC-5, Lei Zhang wrote: > > I am going to implement a small and simple search feature in my project. > But got a question about the scenario I have right now. So hope to get some > tips from here. > > First of all, this is a rails app. > > There are tw

[Rails] Urgent multiple Requirements

2016-01-13 Thread will...@philinfosys.com
Hello, This is William from Philinfosys and We have an immediate requirement with our client where we have excellent hold and can close the positions pretty quick. Those who are interested please respond with your updated profile to my email id: will...@philinfosys.com 1. Ruby on Rails Develo

[Rails] Re: Character Counter is showing a negative number, not initial value

2016-01-13 Thread David Williams
Walter Davis wrote in post #1180603: >>> It's giving me Nan when I wrap the parseInt method around the counter. >> >> Check that your spelling of the attribute is correct, note the typo in the > example. Also, if you want to be extra-careful (just had to deal with > this > yesterday) you can go all

Re: [Rails] Rails installation Invalid gem : package is Corrupt-nokogiri

2016-01-13 Thread vigneshwaran sivalingam
Thank you so much for your guidance Walter. On Wednesday, January 13, 2016 at 6:26:04 PM UTC+5:30, Walter Lee Davis wrote: > > > > On Jan 13, 2016, at 6:35 AM, vigneshwaran sivalingam > wrote: > > > > Hi colin, I tried what you said, It reinstalled the ruby then rails, but > when it downloade

Re: [Rails] search backwards in an one-to-many association

2016-01-13 Thread Colin Law
On 13 January 2016 at 14:20, Lei Zhang wrote: > My mistake not making it clear enough. > > Actually they have some attributes. > > Let's say, > > A has a simple attribute called A.name and C also has a attribute C.name. > > Then A has_many C, which means C.a_id exists. > > In my case, my requireme

Re: [Rails] search backwards in an one-to-many association

2016-01-13 Thread Lei Zhang
My mistake not making it clear enough. Actually they have some attributes. Let's say, A has a simple attribute called A.name and C also has a attribute C.name. Then A has_many C, which means C.a_id exists. In my case, my requirement is that if users enter C2.name、 C3.name and C4.name, I shou

Re: [Rails] Character Counter is showing a negative number, not initial value

2016-01-13 Thread Walter Lee Davis
> On Jan 13, 2016, at 7:48 AM, Walter Lee Davis wrote: > > >> On Jan 13, 2016, at 12:44 AM, David Williams wrote: >> >>> >>> max_length = parseInt(counter.data('maximum-lenght')); >>> >> >> >> It's giving me Nan when I wrap the parseInt method around the counter. > > Check that your sp

Re: [Rails] Rails installation Invalid gem : package is Corrupt-nokogiri

2016-01-13 Thread Walter Lee Davis
> On Jan 13, 2016, at 6:35 AM, vigneshwaran sivalingam > wrote: > > Hi colin, I tried what you said, It reinstalled the ruby then rails, but when > it downloaded the nokogiri1.6.7.0.gem, it showed error. But anyway rails was > installed. When i checked the version it shows > ~$ rails -v > Ign

Re: [Rails] Character Counter is showing a negative number, not initial value

2016-01-13 Thread Walter Lee Davis
> On Jan 13, 2016, at 12:44 AM, David Williams wrote: > >> >>max_length = parseInt(counter.data('maximum-lenght')); >> > > > It's giving me Nan when I wrap the parseInt method around the counter. Check that your spelling of the attribute is correct, note the typo in the example. Also,

Re: [Rails] Rails installation Invalid gem : package is Corrupt-nokogiri

2016-01-13 Thread vigneshwaran sivalingam
Hi colin, I tried what you said, It reinstalled the ruby then rails, but when it downloaded the nokogiri1.6.7.0.gem, it showed error. But anyway rails was installed. When i checked the version it shows ~$ rails -v Ignoring executable-hooks-1.3.2 because its extensions are not built. Try: gem pr

Re: [Rails] Rails installation Invalid gem : package is Corrupt-nokogiri

2016-01-13 Thread vigneshwaran sivalingam
Thank you. On Wednesday, January 13, 2016 at 1:04:40 AM UTC+5:30, Aishwarye Omer wrote: > > Hi @vigneshwaran sivalingam > > Please check the version of ruby installed in your ubuntu. ( ruby -v) > > Sometimes it may happen that some package file does not install while > installing ubuntu. > > you

Re: [Rails] search backwards in an one-to-many association

2016-01-13 Thread Colin Law
On 13 January 2016 at 07:22, Lei Zhang wrote: > I am going to implement a small and simple search feature in my project. But > got a question about the scenario I have right now. So hope to get some tips > from here. > > First of all, this is a rails app. > > There are two models, A and C. > > A h