consider the above code… Is there an easy way in rails to get only the
unique values, not the doubles? Since, for instance, Amsterdam (my city
of habitat) will be returned about a thousend times or so, I want to
make a list of cities that have rooms available.
I know how to code a function for this, I was just wondering about
peoples thoughts on this (Am an absolute beginner myself, though been
coding other languages for years)
consider the above code… Is there an easy way in rails to get only the
unique values, not the doubles? Since, for instance, Amsterdam (my city
of habitat) will be returned about a thousend times or so, I want to
make a list of cities that have rooms available.
I know how to code a function for this, I was just wondering about
peoples thoughts on this (Am an absolute beginner myself, though been
coding other languages for years)
(Of course, this begins to be a bad example as it doesn’t sound like
Room belongs_to :city anyway.)
actually I believe that within my system (at work that is) rooms indeed
doesn’t belong to city, BUT city belongs to rooms though… or to be
true to form, city has many rooms
but thanks a lot anyway, in this beginners stage any info on any topic
is most welcome!