similar to: Where to put method

Displaying 20 results from an estimated 4000 matches similar to: "Where to put method"

2007 May 09
1
form.select wrong number of arguments (0 for 1)
I am new to rails, PHP background. I''m completely lost on this. I am trying to pull all of the albums from the albums table into a select box. But every time I run the script I get the "wrong number of arguments (0 for 1)" error. I''ve looked on other message boards and searched the web but I can''t seem to find the answer. I''ve tried several different
2006 Jan 03
1
Passing parameters with link_to
I have following code in my controller: class AlbumsController < ApplicationController def list_by_year(year) @album_pages @albums = paginate :albums, { :per_page => 10, :conditions => ["year = ?", year] } render :action => ''list'' end end Now I want to make a link to the list_by_year action in
2006 Jan 22
11
ActiveRecord find
Suppose I have three tables - authors, posts and topics. Every post have a topic and every topic has an author, so I have posts.topic_id and topic.author_id. When the author is guest (not registered), author_id is nil. I need to find all the posts (in one query) where every post have all the information of the topic and the auther, so if p is one of those posts I could get the name of the
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
2000 May 12
9
comment field proposal
Well, this is a bit stronger than a proposal; this is "what I plan to do unless people see obvious flaws I missed"... The text comment header is the second (of three) header packets that begin a Vorbis bitstream. It is meant for short, text comments, not arbitrary metadata; arbitrary metadata will be put in a metadata stream, likely an XML stream type. We've discussed this in
2001 Dec 07
4
album portion of the tags request
I wanted to post publicly my problem with Jonathan's proposed album requirements. Although I do apologize, since this thread is too big already. The idea that as a requirement one should be able to identify the exact CD a track was ripped from is not a valid requirement in my book (not for the tags at least), and I hope I can explain why. Without knowing the exact way Jonathan wishes to
2005 Dec 15
2
HABTM being tricky
I''ve just been bodyslammed by a problem with has_and_belongs_to_many - as far as I can tell, if it doesn''t appear at the top of other relationship definitions it doesn''t seem to work right. For example: class Artist < ActiveRecord::Base has_and_belongs_to_many :genres has_many :albums has_many :videos has_many :cds has_many :collections end ..works fine
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
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
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
2001 Aug 21
2
Title formatting for players/plugins
Hi, Peter Pawlowski's new (1.15beta) winamp decoder plugin seems quite nice, in my opinion.. The "title formatting logic" is what I've been dreaming of for ages.. Right now I've chosen "%artist / [[%[abbr20]album][-%[num2]tracknumber] / ]%title[ - %version]" I get titles such as "Artist / Title"or "Artist / Album / Title" or "Artist /
2004 Aug 06
3
legalities of streaming
Oh, I almost forgot... If you're going under compulsory licensing: 1) Listener requests cannot be honored, otherwise you will end up labeled an "interactive service" along with Audiogalaxy Rhapsody & the like. Which means more & more expensive royalties. 2) You cannot play more than 3 songs of the same album in any 3 hour period (no more than 2 in a row). Nor can you
2007 Mar 08
2
Q: Tool to copy Vorbis comments to MP3 ID tags
Hi, I'm wondering: If you have audio files like foo1.ogg and foo1.mp3, and the Vorbis file has nice comments (title, tracknumber, artist, album, date, etc), is there a tool to copy the information to an MP3 file on a "best effort" strategy? I know that MP3 TAGs are quite limited regarding lengths. Regards, Ulrich
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.
2006 May 20
3
Alphabetically sorted list pages + dynamic forms
Hey everyone, I''m new to RoR - how can I get my database content filtered by alphabet? Eg, on my php site now I use this format: http://www.scenepointblank.com/reviews/index.php?page=B How can I get this kind of functionality out of ruby? Also, how could I go about making a multiple select box of authors, then depending on how many you chose, the next page of the form displays a
2013 May 08
1
Using koala get facebook albums photos
Hi Folks, Good day, I need to display my facebook album photos in my application. I used *Koala *for facebook API. I used this query for getting my album photos, *current_user.facebook.get_connection("me","albums")* by using this i can get only the albums details. *"I need my photos which i upload in facebook "* * * Please advise. Thank you -- You received
2000 Oct 15
2
using vorbiscomment
As far as I could find, nowhere in the documentation or even source does it actually explain how to use vorbiscomment. Just a simple "vorbiscomment reads TAG=VALUE pairs on separate lines from stdin" would save people a lot of time. Of course, this is still a painful tool to use, and since I had some .ogg's lying around with broken comments (from my first ogg vorbis patch to grip),
2000 Aug 02
4
RDF Metadata Specification
I've put together the first attempt to defining an RDF metadata vocabulary for use with the CD Index/MusicBrainz/OggVorbis. If you care about metadata issues, please take a look at: http://www.cdindex.org/MM I've included a section for video specific stuff, but everything that I originally had in there is being covered by the MM:Contributors section. The Contributors stuff will allow
2010 Aug 08
5
Ruby 1.8.7 and openssl failed compile
I got this error: ossl_ssl.c: In function ?ossl_sslctx_get_ciphers?: ossl_ssl.c:626:19: error: ?STACK? undeclared (first use in this function) ossl_ssl.c:626:19: note: each undeclared identifier is reported only once for each function it appears in ossl_ssl.c:626:25: error: expected expression before ?)? token ossl_ssl.c:629:47: error: expected expression before ?)? token