Displaying 20 results from an estimated 10000 matches similar to: "has_many before saving record"
2006 Jul 18
0
another 2 newbie questions
Hey all,
Ok I have three tables:
Images(id,name,dirid) #dirid is a foreign key to Album.url, the path
to the image
Albums(id,url)
Tags(id,name)
ImagesTags(image_id,tag_id)
I have a HABTM relation for tags and images and a belongs_to/has_many
relation for albums and images.
Now in my views/tag/show.rhtml I have this:
<% for album in @albums %>
<% for image in @images %>
<% if
2010 Oct 30
0
Will_Paginate — Set the Starting record ? IE, Photo 3, of 8
Hello. I''m working very hard to build projects > photo_albums > Photos
But am Stuck on being able to implement it.
Desired User Flow...
#1 - User clicks their project
#2 - User sees a list of photo albums
#3 - Users clicks a Photo Album
#4 - User see a list of photos in the album
#5 - User views the clicked photo BUT has will_paginate showing in
the nav for all
2005 Dec 05
0
bug in bubbleshare's Active Record extensions?
I''m using add_foreign_key_constraint and remove_foreign_key_constraint
from Bubbleshare''s Active Records Extension plugin now to manage the
foreign key relationships I describe in my other recent posting. The
constraints get added within migrations, but I''m running into two
problems (Rails 0.14.3, PostgreSQL db):
1. Dumping the schema doesn''t dump the
2002 Jan 13
0
Win32 commandline discid utility?
I'm in the process of re-encoding lots of albums with rc3. This isn't too
hard because my computer lab at school has 24 machines which I can all get
ripping/encoding in parallel. Machines are Win95. I'm currently using EAC
(www.exactaudiocopy.de) to do clean rips (unfortunately a GUI interface), a
cygwin port of normalize (http://www.cs.columbia.edu/~cvaill/normalize/),
oggenc,
2006 Feb 19
2
Sortable list (scriptalicious) and updating database
I have made a sortable list which is sortable by dragging & dropping the
list elements. It works, but the order of the elements will not be
updated in the database. Hopefully someone could help me, or tell me
what I''m doing wrong.
Thnx!
Rgds,
Eric
Controller: album_controller.rb
class AlbumController < ApplicationController
def show_sort_album
@photos =
2012 Feb 02
0
Gapless Support
On Tue, Jan 17, 2012 at 09:44:25AM +0100, rs at noveltech.de wrote:
> We are currently try to add Gapless support on our device? If we rip an CD
> with our device, we can find out, that one track follow after another so we
> can
> recognize, that the tracks are gapless or not.
Are you aiming for maximum compatibility with how the source CD would be
played on an average CD audio
2008 Jun 02
3
Adviced way of tagging music
I change a lot of my CD to Ogg to be able to listen them easily from my
computer (I use foobar, I was used to WMP but it does not support library
for Ogg files and plug-ins I found for this where poor) without the need for
frequent CD changing.
I like my music to be richly tagged. But with classical music CD it is a
real pain to tag those files. Typical problems involve:
- single CD
2007 Apr 29
1
acts_as_list with :scope - how do I move items to a different list?
Hi,
I have in my simplistic app:
class Album
has_many :pics, :order => :position
end
class Pic
belongs_to :album
acts_as_list :scope => ::album
end
It all works fine when creating a new pic from the forms. But, when
trying to move a pic between albums, the album changes Ok, but no
matter what I do the position attribute stays the same and the list
navigation is broken. So far,
2009 Mar 10
1
FLAC: album replaygain value does not match any track value
Hello !
I ran FLAC over 3 wav tracks from the same CD
generating replaygain info.
Actually, albums gain and peak values do not match
any track values (see run below). The TRACK_PEAK values are
identical for the 3 tracks and, which is weird, we have
one track with a TRACK_GAIN greater than the ALBUM_GAIN
whereas another track has a lower value.
I had expected the album values to be the maximum
2013 May 23
0
xml newbie
Dear r-helpers,
I am trying to extract quantities of interest from my iTunes library xml file. For example, i'd like to be able to run a simple regression of playcount on track number, under the theory that tracks near the beginning of albums get played more (either because they are "better" or because people listen to the beginnings of albums)
I have an xml file that is of the
2006 Jan 21
9
Where to put method
I''ve got following code in GenresHelper.rb
def album_list(genre)
albums = genre.albums.sort
list = albums.collect { |album| link = link_to album.title,
:controller =>
''albums'',
:action => ''show'',
2008 Feb 11
2
Replay-gain
On Monday 11 February 2008 05:04:25 Pyt wrote:
> Can you elaborate on what you mean by "correctly use" ?
>
> On Feb 11, 2008 1:03 AM, Christopher Brown <c-b@asu.edu> wrote:
> > Is there a way to correctly use the replay-gain feature on flac files
> > that contain an entire album (i.e., multiple tracks with seekpoints added
> > from a
> > cue sheet)?
2002 Jun 23
5
(Un)Usefulness of Vorbisgain?
I've just Replaygained several of my Vorbis albums with Vorbisgain, ranging
from 80's metal to present day soft rock. What I don't understand is why does
Vorbisgain actually make all tracks QUIETER? I see an average of -7db on
most albums. And after that, not only are they substantially quieter than my
MP3s (which is a pain), but it also fails to really "even out" the volume.
2006 Apr 25
6
Searching over multiple MySQL tables
I am racking my brain over this, probably because I only know very
simple mysql functions.
Basically I''ve got a few tables, ex:
Albums (id,name,band_id); Bands (id,name,label_id), and Label (id,name)
I want to search through both album.name, band.name, and label.name
throwing all results into a variable, with no redundant info.
I think what I need to be doing is setting up some
2006 Jan 10
1
[AJAX] related drop-down list question
Hi all,
I followed the example on: http://www.roryhansen.ca/?p=9 for creating
related drop-down lists.
However, this code actually creates HTML in the controller component:
@albums = Album.find_all_by_artist_id(@params["artist_id"])
@html = "<select id=''album_id'' name=''album_id''>"
@html += "<option
2006 Aug 11
5
Why does no one like render_component?
Maybe I''m missing the point?
Lets take for example albums of pictures. If I have a scaffold for
each, and I''m showing an album, what if I want to list all of the
pictures that are in the album?
Surely, I''d want to call the List action in the picture controller.
render_component would do this perfectly. But we''re told not to use
render_component. So
2006 Jul 17
6
3 newbie questions
hey all,
I have 3 tables like this:
Images (id,name)
Tags (id,name)
ImagesTags(imageid,tagid)
in my image model I do a "has_and_belongs_to_many :tags" but to make
it work I need to rename ImagesTags(imageid,tagid) to
Images_Tags(image_id,tag_id). My question is that given that I can''t
rename the table, is there any way to make it work with the original
names?
Second question:
2010 Aug 12
10
Scaffolding working...kinda
Hello all. I''ve been working through some online tutorials, learning ROR
and have a question on scaffolding. Through the command promt i''ve ran
the command:
$ script/generate scaffold Albums
This created the controllers, helpers, models, and views.
I have a database table titled "albums" and have two records saved
within
The problem is that the scaffold command did
2010 Aug 08
1
help me
i am creating an aplication where table name albums width attributes
CREATE TABLE albums ( id int(11) NOT NULL auto_increment,
title varchar(255) NOT NULL default '''',
artist_old varchar(255) NOT NULL default '''',
release_date datetime NOT NULL default ''0000-00-00 00:00:00'',
genre varchar(50) NOT NULL default '''',
created_at
2004 Nov 14
0
Raincast, a 'stream helper' I've made. Looking for feedback.
Hello everyone. I've worked on creating a "stream helper" that acts
as a script for Ices 2.0 to use. I've recently completed it and I'm
looking for feedback and comments. The site is at
http://raincast.thedreamrealm.com/ , and here are its features from
the docs:
Raincast is an open-source internet radio utility program written in
C++ which is designed to act as a