search for: album_id

Displaying 8 results from an estimated 8 matches for "album_id".

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. <%= select("post", "album_id", Album.find_all.collect {|a| [a.name, a.id]}, {:include_blank => true}) %> This work in so much as I can see the album...
2006 Jun 11
4
remote_function posting?
Hi, I''ve noticed that my remote_function calls are resulting in POST requests. As a result, my routes do not apply since it does not generate a url based on the parameters, but simply posts to the raw url with post data. I want to make a GET request instead of a POST. How can I do that? Has anyone else run into this? Thanks, Ryan -- View this message in context:
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.id}''>#{@album.album_name}</option>" end @html += "&l...
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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rub...
2006 Jul 17
6
3 newbie questions
..._to :album, :foreign_key => "dirid" and in my Album model I put: has_many :images Yet, in my album/list.rhtml when I put : <td><% for picture in album.pictures %> <%= picture.name %> <% end %> </td> I get: SQLite3::SQLException: no such column: pictures.album_id: SELECT * FROM pictures WHERE (pictures.album_id = 1) so it looks like the :foreign_key => "dirid" is ignored. Any idea what I could make it work? Third question: I would like to right some code that would work like this: <% if thumbnail-file.jpg doesn''t exists execute...
2005 Dec 05
0
bug in bubbleshare's Active Record extensions?
...nstraints and then attempting to dump the schmea also didn''t include the constraints, so maybe this chunk of things is just plain 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&...
2007 Apr 21
3
attachment_fu thumbnails
howdy! I had the problem that attachment_fu didn''t make a thumbnail, but everything else worked. I read this post http://www.ruby-forum.com/topic/104213 and added a parent_id column. now I get the following error when I trie to add a photo: undefined method `find_or_initialize_by_thumbnail_and_parent_id'' for Photo:Class my code is: class Photo < ActiveRecord::Base
2011 Sep 08
10
Image upload with progress bar
Hello there, I try already third day to find a way, how to improve my upload about progress bar. I use for upload of images the paperclip gem and in my app jQuery library. Could anyone give me, please, any help or tip, how to do? I tried to search, read a discussions, but I still don''t know, how to do... So, thank you so much for every advice. -- Posted via