similar to: many to many link table compound primary key explosion

Displaying 20 results from an estimated 100 matches similar to: "many to many link table compound primary key explosion"

2006 Jul 01
4
Radio_button in loop problem
Hi all, I can''t figure out why my radio_buttons won''t reflect the values stored in my database. I read through some of the previous posts -- is it true that they don''t work with integers? This is the code I''m using: <% for question in @survey.questions %> <%= debug question %> <%= radio_button ( "question", :question_id,
2006 Apr 02
2
"Quiz" site
Hi, I am thinking about how to best design a quiz site in RoR. I think it should be fairly easy, but have run into a wall. In the simplest form, the view would grab all of the questions for a particular quiz and display them (e.g. multiple choice, so 4 option buttons per question). However, I can''t figure out how to "mark" the quiz. The form is submitted to the
2005 Dec 14
6
mysql connection problems
Hi hi i have a problem trying to connect to the mysql database when I do a rake it says: Access denied for user: ''@localhost'' to database '''' My database.yml file is fine Any ideas why this is happening -- Posted via http://www.ruby-forum.com/.
2011 Sep 11
5
question about a where condition
Hey all, This example of working code: @a = @b.where(:a_group_id.ne => nil).collect { |b| b.a_group } doesn''t make too much sense to me. For one, I am not sure what that "ne" is doing there. Is this a postgresql thing? Second, it looks like we are collecting active record objects where the a_group_id is null, collecting them in an array and then invoking the a_group
2006 Apr 04
2
Syntax Error in find()
Maybe I misunderstand the parameterization of find(), I am getting this syntax error for <% @choices = Choic e.find(:all, :conditions => "question_id" = question.id, :order => "order") %> ---- ERROR LOG ---- ActionView::TemplateError (compile error ../config/../app/views/admin/test/show.rhtml:37: syntax error _erbout.concat " "; @choices =
2006 Jan 19
8
Passing variables across forms
I''ve been reading my Agile Dev book over and over again, but I can''t wrap my head around how to do this. There''s a question and answer portion site of my site. You begin the process by adding a question to the database. After that, the program should redirect you straight to adding an answer for that question. The problem is, I don''t know how to keep
2006 Jun 04
4
Multiple checkboxes
Please could someone suggest what might be wrong here. In my view I''m displaying a series of check boxes and when the form is submitted I want the controller to iterate over the values and contatenate them all into a string "1" if the box was checked and "0" if it wasn''t. I''m new to Ruby and Rails and I can''t seem to get any values out of
2006 Apr 02
5
adding primary_key to join table using migrations
Hi list, My tag_question_user join table is not currently a full-blown model. It doesn''t have a primary key - just tag_id, question_id, and user_id. I now want to add a primary key to this model (because I want to add a "description" column as well so users can describe the tag. I''m not sure how to add this using migrations. Here is what I have: class AddNotesToTags
2006 Aug 07
1
Unable to page.replace_html from rjs
I am having problems updating a div defined in a partial using both Element.update and page.replace_html in an rjs. I can put a link_to_remote in the partial using an :update, and the div updates fine. Does anyone have any idea why this might be happening? In the partial: <div><div> . . <div id="question_<%=question.id%>_error"></div> . (if a
2006 Jun 02
7
Unit Tests crashing out for a table without an ID
I''m having problems unit testing my model- I have a kind of quiz functionality user table and a question table and a user_question_response table that contains the id for the user, the id for the question and the user''s response. The user_question_response has it''s own model belongs_to/has_many with users and questions and it works fine in the actual application but
2009 Feb 27
5
Polymorphic association..explain the extra query ?
Can anyone explain to me the sql query done in the last step : http://pastie.org/402200 -- Arpit Jain --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group,
2012 Jan 11
1
How many "rollback" TXGs in a ring for 4k drives?
Hello all, I found this dialog on the zfs-devel at zfsonlinux.org list, and I''d like someone to confirm-or-reject the discussed statement. Paraphrasing in my words and understanding: "Labels, including Uberblock rings, are fixed 256KB in size each, of which 128KB is the UB ring. Normally there is 1KB of data in one UB, which gives 128 TXGs to rollback to. When ashift=12 is
2005 Dec 23
8
webrick / winxp won''t stop serving cached file??
Hi Working through the tut material in teh PP book (agile dev with rails) on a laptop running winxp. Creating the "admin" application, things generally work great. Except: at teh end of chapter 6, when we update teh css to improve the look of the page - I copy the new scaffold.css into my working directory, but webrick keeps serving the old css, even after a restart. Very odd. The
2012 May 02
2
Column with dynamic db type
Hi, I have a Question model where the answer to the question can have multiple db type (integer, string, boolean, ...). I would like to know if you have a better solution than this one: Question: question:string answer_type:string AnsweredQuestion: question_id:integer answer:text answer_type:string Ex: AnsweredQuestion.create(:question => 1, :answer => ''5'',
2004 May 03
1
SIP Call transfer with RTP transfer as well?
I am using SER as a proxy, and using Asterisk as a PBX. A user calls in to a 1-800 number. They listen to the IVR on one Asterisk PBX, and then are transferred to the call center at the other Asterisk PBX. Calls are being brought into the system via SIP. I need to transfer users from one Asterisk box to the other. Functionally this works fine, practically it doesn't as Asterisk forces the
2011 Sep 12
4
EngineYard deploy - Vanilla Database
Hi folks, Just after a ''best-practise'' recommendation here really, I am deploying a series of applications to EY and for each one, need to setup the database with some default settings / user account etc etc. What is the best way to write a few initial rows to a vanilla database? I''ve looked into using the deploy hooks on EY but it doesn''t seem to cover DB
2006 Jan 20
10
1st attempt at rails testing - could really use some help...
Howdy, I''m attempting my first rails test & I could use some help... I have the test posted at http://rafb.net/paste/results/YjWkIh45.html... when I run it, the test fails, but the db table is never restored & it seems that the fixtures file was never loaded... Any ideas as to what I''m doing wrong? Thanks! -- Posted via http://www.ruby-forum.com/.
2005 Sep 07
3
Extensions - Realtime
CVS HEAD/Asterisk 1.2: Is there a way to have the entire extensions.conffile coming from the realtime? It appears that RealTime for the extensions.conf file is on a context by context basis, but you have to create each new context in the extensions.conf file then add a "switch => Realtime" line (then reload). I want to be able to add phones without having to edit any files.
2002 Apr 25
2
ssh-rand-helper probs
Hi all Am i doing this right? Is this the right list to post to? If not, a quick lesson in ettiquette for me would not hurt. As I am both just starting to use newsgroups and SSH, I am not entirely familiar with the processes. I have a question about ssh-rand-helper. First an outline: I am currently using the SSH packages for Solaris 2.8 available at sunfreeware.com. The environment is
2003 Jul 25
0
Memory explosion, plotting nmle grouped data object
Hi I am using R 1.7.1 on RH linux 9.0 > sum(unlist(lapply(ls(),function(x)object.size(get(x)))))/1024^2 [1] 2.424263 so I am not using much memory (I have a gig of ram on my machine) now in nlme > gtest<-groupedData(log(X8)~Time|sub,all[,c(names(all)[1:9],"X8")],outer=~A*B) > object.size(gtest)/1024 [1] 59.98438 > plot(gtest,outer=~Dose*chem,key=FALSE,asp=.5) Plotting