similar to: Rails, Transactions, and statements

Displaying 20 results from an estimated 6000 matches similar to: "Rails, Transactions, and statements"

2006 May 10
4
Single Table Inheritance problem
I have two tables I am using single table inheritance with: Page and Item. "Page" has many "Items"; "Item" belongs to "Page". Item Model: class Item < ActiveRecord::Base end class Article < Item belongs_to :page end Page Model: class Page < ActiveRecord::Base end class Issue < Page has_many :articles end In my controller, when I
2006 May 14
2
object class with STI and Polymorphic Assoc''s.
Hi, lets say I have a a table, "Linkings" that I am using for polymorphic associations. One of the associations is to the "person" table, and there are several other associations. "Person" has 2 types, "slacker" and "suckup". It is modelled as such: class Linking < ActiveRecord::Base belongs_to :person belongs_to :linkable, :polymorphic
2008 Jan 10
4
Mocking and stubbing Rails'' association extensions
I''m having a lot of trouble stubbing out an association extension for some view tests. Example rails code modeling a music album: class Album < ActiveRecord::Base has_many :songs do def streamable find(:all, :conditions => ''streamable = 1'') end end end So for a given Album instance (say @album), I need to be able to stub both
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
2004 Sep 10
1
[Flac-users] Grip, FLAC, and album replay gain
OK, here's a problem: I want to set the album replay gain in each track, but I'm using grip to rip and encode the tracks one by one. grip knows that all the tracks are on a single album, but FLAC sees them one at a time. I put the --replay-gain option on the FLAC command line, so it emits four comments into the vorbis commebnt block, e.g.: comment[9]:
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'',
2009 Dec 30
3
flac --replay-gain
I have FLAC files that I would like to re-encode with --replay-gain. I have my Flac's organized in Artist/Album folders, so I should have no problem getting an album gain/peak per album. Do I need to first de-code the flac's to wav files and then "flac --replay-gain *.wav", or can this be accomplished by going to each Album directory and "flac -f --replay-gain
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)?
2006 Feb 23
7
How to set a relationship with a value from a selection list
I realize this is probably a very basic problem but I''m developing my first rails app and running into this problem. I''m trying to write a photoblog application. I have a photo table and an album table. Photo has a to-one relationship to Album. Photo.album_id => Album.id In my view for photo I have a selection list that''s populated with all the available albums.
2005 Jun 21
2
Playback + Replay Gain questions
Thanks! You've been most informative. Do the command line options vary for album and track or is the album gain computed automatically if it's done on a batch of files? You Wrote: > > there are two tags for replaygain, the 'album' tag which applies > to the whole album, and 'track' tag for each track.
2007 May 12
4
help, 1 error(s) on assignment of multiparameter attributes
Hi everyone! I just started learning Ruby on Rails about a week ago for a school project, and can''t seem to find a solution for something. I have this inside the form inside of edit_albums.rhtml: <%= start_form_tag :action=>''proccess_edit_album'', :id=>@album.id %> .... Release Date: <%= datetime_select(:album, :release_date, :start_year => 1960)
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
2004 Sep 10
5
new CUESHEET metadata block
--- smoerk <smoerk@gmx.de> wrote: > good idea, i'm always putting *.cue files to the directory with the > ripped audio files. but it would prefer one file per song and not one > big file for the whole cd. My vision of how the players should work is this: - make one album.flac with CUESHEET - player loads album.flac, sees CUESHEET, calculates CDDB id (or CDindex, or custom
2008 May 10
4
Newbie: lambda do...end.should change(Model, :count).by(1). Doesn''t work
Hi to everyone, I''m an RSpec, and BDD in general, newbie so in order to learn I have chosen to use my personal website as a tesbed. I''m having difficulties juggling with mocks, and in particula with the following code. Here''s the controller action: def create @album = Album.new(params[:album]) if @album.save flash[:notice] = "album saved"
2008 Oct 17
1
Album art - requirements
Hi, [ Was away the last few days, so this partly overlaps on things that that have been mentioned in this thread. Since the consensus seems that Vorbis comment encoding is the way to go, it's a bit moot, but here it is anyway ] Following up on the possibility to tag various images as different types of album art, I thought of adding that tagging information in a Skeleton stream. Since
2006 Jun 02
1
Updating html breaks my interface
I have two select menus on a line. The first updates the second: library: library_select album: album_select So when you pick a library, the album_select is automatically updated to show the relevant choices. This is done using ajax. While the ajax request is loading, I switch the album_select with a loading_select, which is a disabled select menu with only one choice:
2007 Feb 10
1
calling destory on HABTM clear
I know this is probably stupidly simple, but I can''t seem to figure it out. I have a many-to-many association using HABTM. Im trying to clear all the stuff in the join table and call destroy on all the joined items. For example if I have a many to many for albums and photos, def method album=Album.find(4) album.photos.clear # NOW HOW DO I DESTROY ALL THOSE PHOTOS? end The things I
2011 Jun 22
2
Hyphen in Vorbis Comment
Hello, I am trying to tag some ogg vorbis files with hyphen "-" in the comment field. For e.g. album name = Example - EP. But this is being displayed as ALBUM=Example ALBUM=EP Is there no way we can have a hyphen in the comments section?
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
2017 Jun 07
2
title streaming with ices
On Tue, 2017-06-06 at 16:18 +0000, Larry Turnbull wrote: > >Recently Stream Licensing LLC has changed their requirements so that > >streaming internet stations in the US must title stream the album along with > >the song title and artist. > > > >I use ices for the backup automation when no live programming is taking > >place. > > > >Ices shows the