Displaying 20 results from an estimated 200 matches similar to: "[AJAX] related drop-down list question"
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
--~--~---------~--~----~------------~-------~--~----~
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 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
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
2009 Apr 11
6
Inserting data from 1 table to another by using find_by_sql
Hi All,
I am inserting data from one table to another by using following method
@data=RoyaltyReportFiles.find_by_sql("insert into royalty_reports
(artist_name, album_name) select artist_name, album_name from
temp_royalty_reports where id=328417")
it saves the data into royalty_reports table but it gives following
error and application crashes. i am using rails 1.2.5
You have a nil
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
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:
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 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"
2006 Feb 07
4
Dynamic url with javascript? - Help Please
Hi,
I''m trying to call a remote function when a combobox option is selected,
passing as an argument the current value of the combobox (paramenter
"panel_id":
<select id="server_interface_jack_switch_panel"
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:
2006 Jan 06
3
Countries -> Cities Select box
I am trying to play with a Countries -> Cities dynamically updating select
box.that is if someone selects a country then all the cities of that
country must be listed.Does anyone know of any data source for this?
I searched for it but couldnt find any good usable source.
Better still is there a module which I can mixin for this?
Thanks
Vivek
-------------- next part --------------
An HTML
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 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
2006 Apr 09
12
Help With Dependent Drop-Down and @Params
Hello All:
I am trying to create a select box that is filled with options based on
the user''s selection in a related drop-down. I have had success with
this before using the examples provided by the following two sources:
One posted by Rory at Rory on Rails - http://www.roryhansen.ca/?p=9
the other posted by Adam at
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
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 =>
2009 Jul 15
2
Fixing ogg vorbis corruption caused by bad metadata
Adam Rosi-Kessel wrote:
> Yes, it was Mediamonkey. They claim that it was due to a bug in vorbis
> libraries.
All software has bugs, but this explanation doesn't really add up.
libvorbis is the codec. If they had blamed libogg, which does the
container, then yes, that would have been a believable explanation :-).
Erik
--
2006 Mar 22
1
Ajax.Updater dropping first <OPTION> on IE?
I am attempting to use Ajax.Updater to update the innerHTML of a SELECT -
that is, to feed it a list of <option>..</option> sets generated from a
partial.
It works as expected on FF1.5, but in IE6 it renders as an empty select.
When I use the DOM viewer (or an alert()) to dump the value of innerHTML, it
appears intact EXCEPT that the first <option> is missing with no
2006 Jan 02
1
best way to detect drop down changes
So I want to have a form with a drop down that lists all our customers.
And when a user selects a customer, I want it to automatically list the
customer names emails below the drop down.
Anyone have any thoughts as the best approach to do this? I could just
write javascript, but it seems like there would be a rails tag for this.
thanks,
phil
--
Posted via http://www.ruby-forum.com/.