Displaying 20 results from an estimated 1000 matches similar to: "HABTM being tricky"
2006 Jun 25
2
how to write the codes in view?(newbie question)
Hi.
I have two tables and want to join them.
<genres>
id
genre_name
genre_order
<links>
id
genre_id
name
symbol
url
order
display
etc
The code of links_Controller is like below.
def list
@links = Genre.find(:all,:include => :link)
end
Below is the mysql log.
SELECT genres.`id` AS t0_r0, genres.`genre_n
ame` AS t0_r1, genres.`genre_order` AS t0_r2, links.`id` AS t1_r0,
2007 Sep 23
3
Connecting a row of an unknown table to another row of an unknown table
Hello all,
I''m currently designing a web app in Rails that lets me keep a directory
of free/opensource computer games. Each game has attributes like name,
website, review, etc., but each game can also be associated with a set
of genres and gameplay elements. The main three tables I''m working with
are "games", "genres", "elements",
2006 Mar 04
3
select helper method
Hey
I''m having problems understanding the select helper. Here is my code:
_____________________
DB table: genres
id
name
descripition
___________________
In the controller:
def index()
@genres = Genre.find_all.map {|u|[u.name, u.id]}
@id = params[''genre'']
end
____________________
In the view:
<%
@genre = Genre.new
@genre.id = @id
%>
2013 Sep 18
4
Opus now supported at Magnatune
This seemed to be the best place to let you guys know....
Magnatune.com's entire catalog is now downloadable in Opus format, with full metadata (small and large cover art) at 128k stereo.
A few comments:
1) I'm really impressed by your metadata implementation. It's very cleanly done, and the multiple artwork idea is fantastic. One suggestion: I couldn't find an example in the
2005 Dec 29
4
Many-to-Many: Where to add the children?
I have two classes Person and Job defined as follows:
class Person < ActiveRecord::Base
:has_and_belongs_to_many jobs
def add_job(job_name)
job = Job.find_by_name(job_name) # See if this job exists
if job.nil? # If this job doesn''t exist
job = Job.new # Create a new job
job.name = job_name #
2013 Sep 20
5
Opus now supported at Magnatune
> If you pass --genre multiple times, it will actually encode multiple GENRE tags in the file. Not sure how many players will properly handle such a thing, though (my prediction: not many, though I think VLC will concatenate them into a comma-separated list).
My mistake, I didn't read the man page carefully enough, which does state this:
> Set the genre comment field to genre. This
2012 Jul 10
3
yp.xml - Size and Contents
Hi all,
1. I recently noticed that yp.xml is still limited to 1,000 entries only
while the web directory says there are over 21K streams. I remember some
discussions regarding the bandwidth required to serve this file, so is it
possible to get it in compressed format? Here are some figures:
- the yp.xml as served now (1K entries) is 343 KB. This means 21K entries
will be around 7 MB.
-
2006 Apr 22
9
one to many question
1. A category has parent categories.
2. A product is in many categories and a category has many products.
3. Products and category both have images in the same image table. ie. a
product and / or category could have multiple images.<=== my question is
related to this
So among other things I presume I have to do the following:
class Category < ActiveRecord:Base
#...
2004 Aug 06
2
Directory listing disappeared
On 22 Mar 2003, Karl Heyes wrote:
> ethereal is a good tool for that, start a capture (maybe with a capture
> filter of "port <port>" or "host <ip>" to limit it if the box has plenty
> of traffic), connect the source, wait a second then stop the capture.
> Pick one of the packets that relates to the source stream and do
> tools->follow tcp stream.
2004 Sep 23
2
random playing order and forum location question
1. where can I find the web-based forum? I'd like to search the solution,
because I was able to setup Shoutcast2 for streaming only one mp3 file, but
nothing else at all. (I did read the faq, the help 2 times, the logs, I even
checked the Tcp/ip traffic of the port of 8000... not found the solution). I
haven't downloaded the source code, because I was too sleepy. (and angry
:-( )
2.
2012 Sep 08
3
Polymorphic has_and_belongs_to_many association
Hi,
I''m currently having the situation where I have to implement a polymorphic
has_and_belongs_to_many by introducing an in between model that handles all
the "has_many :as" and "belongs_to :polymorphic" association
implementations... and is not doing anything else. Thing I don''t like it
here is, I am unnecessarily loading AR instances only to execute SQL
2009 Aug 09
2
floating point
On Aug 7, 2009, at 21:48, Didier Dambrin wrote:
> FLAC doesn't preserve every chunk? I thought it did. I only gave a
> quick try
> but it seemed to have preserved even the most obscure chunks.
> Let me check: it even seems to preserve "MIDI note associated to
> marker",
> which is a very unknown metadata used by SoundForge (& even defined
> in a
>
2004 Aug 06
2
Directory listing disappeared
On 21 Mar 2003, Karl Heyes wrote:
> There really isn't that much changed in ices wrt directory services, it
> just invokes an added libshout API call on encode/reencode cases. Ices
> could do with a tag to enable/disable it though. Check that you have
> recent versions and if you still have the problem send me the http
> headers that ices is sending.
Well, it was current CVS
2001 Jun 20
1
vorbis tag for general music type?
Hi, I am wondering if vorbis has a standard tag for general music type.
I don't mean pop, jazz, etc., but something more in line with describing the
mood of the mucic.
I am thinking of games which have a soundtrack in vorbis format which could
use the user's own repository of .ogg files during gameplay, and use the tag
to choose appropriate music for that part of the game. For
2006 Apr 23
1
checkboxes for filtered search
I have a page that renders a series of about 20 checkboxes on the
left hand side with content on the right. These checkboxes are
created from a DB and that part is all working well.
What I want to do is have a user click on a checkbox [genres] and
have the content on the right be filtered based on the checkbox
ticked. If a user clicks on more than one checkbox than only those
stories
2004 Sep 10
1
xmms plugin, fileinfo
--- Miroslav Lichvar <lichvarm@phoenix.inf.upol.cz> wrote:
> On Fri, Nov 15, 2002 at 09:07:39PM +0100, Miroslav Lichvar wrote:
> > Here is preliminary patch for fileinfo for xmms plugin. Saving and
> > removing of the tag isn't working.
>
> Ok, no comments, so here it is.
sorry, couldn't keep up this weekend...
> > When saving, how handle id3v1, v2?
>
2004 Aug 06
16
a new directory service
So I've been doing some research and thinking here and there about what
a _good_ directory service for icecast would be like. I'd appreciate
some feedback and some discussion on this topic, before I start putting
a lot of effort into developing it.
First off, I think getting rid of # of listeners is a must. It just
creates a self-fulfilling prophecy and encourages cheating. I think the
2004 Aug 06
5
Icecast deadlock with 1.3.12 (fixed)
Folks-
First, let me submit a disclaimer... I know 1.3.12 is unsupported.
However, since icecast2 isn't officially released, I'm abit SOL anyways,
so I'm currently trying to debug it and will release a patch when I'm
done. (Which I'm doing since the code is GPL and I want to
contribute... if no one cares, let me know and I'll stop updating the
list with what i find)
2003 Sep 22
2
64kpbs listening test results
A large group 64kbps listening test has just come to an end, organised through
the Hydrogenaudio[1] audio discussion board (and managed expertly by Roberto
Amorim). Eight codecs were tested on twelve different samples, designed to
cover a wide range of musical genres. The codecs tested were[2]:
* Ahead/Nero 6.0.0.15 HE AAC VBR profile Streaming
* Ogg Vorbis post-1.0 CVS -q 0
* MP3pro (from
2001 Dec 07
2
Revised Proposal for Vorbis TAG Standard
Based on peoples posts to this list, and feedback on
IRC (irc.openprojects.net #vorbis) I have updated the
original proposal. You can read it here. Please read
it before writing any futher questions, comments, or
criticisms of the proposal.
http://reactor-core.org/~djw/ogg-tags.txt
Cheers
Jonathan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: part
Type: