search for: artist_id

Displaying 17 results from an estimated 17 matches for "artist_id".

Did you mean: aristid
2006 Dec 07
2
need to transfer data from old php like db to rails style db
hey all, I have two tables like that from an old php project: artists(id,name) albums(id,artist_id,album_name) and I need to transfer the data of this database to three tables that look like this: artists(id,name) albums(id,name) artists_albums(album_id,artist_id) any idea what''s the fastest query to do this? thanx in advance Pat --~--~---------~--~----~------------~-------~--~---...
2009 Mar 11
1
NoMethodError for select_tag
Hello there. I am following a tutorial with rails 2.1 and I have come across a problem where <%= f.label :artist_id %><br /> <%= f.select_tag(:artist_id, options_for_select([[''choose one'', '''']] + @artists.collect {|art| [art.name, art.id]}, @album.artist_id)) %> (Old artist info:<%= @album.artist_old%>) gives undefined method `select_tag'' fo...
2005 Dec 10
0
Paginate - Count(*) Broken or Am I Cheating?
I have the following paginator setup: @merch_pages, @merch = paginate :merch_item, :per_page => 15, :select => ''DISTINCT mi.id, mi.merch_image, mi.created_at, mi.artist_id, mi.item_description, art.sort_name'', :join => ''as mi JOIN merch_formats mf ON mi.id = mf.merch_item_id JOIN artists art ON mi.artist_id = art.id'', :order => ''art.sort_name'', :conditions => ["mf.active_status = 1 AND format_name = ? AND for...
2006 May 04
4
form post not working
Hi there, I have this form code in a view: <%= start_form_tag :action => "listByArtist", :id => artist.id %> <p><b>List by Artist:</b> <select id="artist_id" name="artists[id]"> <%= options_from_collection_for_select(@artists, "id", "name") %> </select> <%= submit_tag "List" %> <%= end_form_tag %> When I hard code the ":id" in line 1 everything works fine - in that...
2011 Mar 19
5
Routing issue
Hi! I have two models, artists and songs. I have this in my route file: resources :artists, :path => "ackord" do resources :songs end Which gives me urls like this (I''m using https://github.com/norman/friendly_id to create and manage slugs): example.com/ackord/artistname/songs/songname-id Now I want to remove the /songs part to get a url like this:
2005 Dec 05
0
bug in bubbleshare's Active Record extensions?
...in busted. 2. Consider this migration: class AddConstraints < ActiveRecord::Migration def self.up add_foreign_key_constraint "tracks", "album_id", "albums", "id", :on_delete => :restrict add_foreign_key_constraint "tracks", "artist_id", "artists", "id", :on_delete => :restrict add_foreign_key_constraint "albums", "artist_id", "artists", "id", :on_delete => :restrict end def self.down remove_foreign_key_constraint "tracks", :foreign_ke...
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 value=''''>No Album</option>" @albums.each do |@album| @html += "<option value=''#{@album.i...
2010 Oct 11
12
Need advice on controller / view
Need some advice. I''ve got two modules: artists and paintings. In my home page, I''ve got a 2nd page that says "Browse paintings", which displays ALL paintings of ALL artists. This is being rendered by paintings#index. In another page, I should show all paintings of a specific artist ONLY. Meaning, paintings from ONE artist. I cant use paintings#index for this anymore
2010 Aug 08
1
help me
...-00 00:00:00'', genre varchar(50) NOT NULL default '''', created_at datetime NOT NULL default ''0000-00-00 00:00:00'', updated_at datetime NOT NULL default ''0000-00-00 00:00:00'', image_path varchar(255) NOT NULL default '''', artist_id int(11) NOT NULL default ''0'', PRIMARY KEY (id)); when i am running scaffold then it not generating albums_controller.rb file C:\InstantRails-2.0-win_2\rails_apps\music_library>ruby script/generate scaffold Album id:int title:varchar artist_old:varchar release_date:datetime...
2010 Oct 01
20
Paperclip not executing FFMPEG properly
Im using a customs processor to run ffmpeg on a video to create a thumbnail. So far so good. Except when I do: cmd = "-i #{@file.path} -f flv -s 320x240 ~/Downloads/foobar/q.flv" success = Paperclip.run(''ffmpeg'', cmd) Console is reporting: ffmpeg ''-i /var/folders/uL/uL0bYOOZEZaJH5E+BmDJVE+++TI/-Tmp-/stream, 16824,1.mpeg -f flv -s 320x240
2007 Feb 26
24
Ruby/rails port of Cocoon/hibernate
Hi, I''m currently running an apache/jboss cocoon/flow/hibernate/ajax paypal (directpayment) project and am looking into the possibility of porting it across to ruby/rails. For that reason I would like to know the following: 1. Can I call my java classes or would I be looking at a complete rewrite in ruby? 2. How effective is ruby in terms of seperation of concerns regarding design from
2006 Oct 21
0
find_or_initialize_by and Nested Resources
Hey guys, Lets say I have the following nested resources: map.resource artists do |artists| map.resource songs end To create a new song, the url would be: /artists/:artist_id/songs/:song_id However, lets say that an artist doesn''t exist yet. I only want to create an artist if a new song by the artist is successfully saved. I am retrieving the artist using something like: @artist = find_or_intialize_by_country_id(@country) Since the artist doesn''t...
2007 Aug 02
2
STI functionality, but then with multiple tables
...eve this would actually be a feasible. the Post table would be the same as with a STI model (id, title, created_at, updated_at, title, type) but the subtypes with have their own table, the links table would look something like (post_id, url, description) and the songs table something like (post_id, artist_id, ...). The subtypes don''t need an id column, as they don''t, won''t and shouldn''t be models themselves. As with polymorphic relations, eager load is not an option. I can''t load the url and description info from the links table as I don''t know what...
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
2008 Nov 03
4
Really confusing issue involving ActiveRecord and a NoMethodError
Hey Everyone, I have been working on a project where I process an XML file that contains data about a music playlist, and I use 3 models: Playlist, Artist, and Song. Each model is mapped to a table in my database, and when my app processes the XML file, it will populate the database accordingly. The issue I have is that the Artist class and the Song class seem to be undefined, even though they
2010 Mar 20
0
Problem with videos on heroku
...the videos. It works fine when my app runs in local but not on heroku. This is the error log I''m getting, if anyone knows where it can be coming from: Processing VideosController#new (for IP at 2010-03-20 04:32:09) [GET] Session ID: 6abecf60c3369d7c7029e366bb801e08 Parameters: {"artist_id"=>"10", "action"=>"new", "controller"=>"admin/videos"} Rendering within layouts/admin Rendering admin/videos/new ActionView::TemplateError (undefined method `video_file_relative_path'' for #<Video:0x2adc9839fe28>) on l...
2006 Feb 22
9
acts_as_habtm_list plugin
I''d like to announce acts_as_habtm_list plugin for rails. acts_as_habtm_list is a Ruby on Rails plugin, that can manage ordered lists through a join-table. It is providing almost the same Api as acts_as_list. The position column has to be defined in the join table. You can find additional information at: http://www.inlet-media.de/acts_as_habtm_list/ Install it executing this command