Displaying 20 results from an estimated 900 matches similar to: "rails 3.2 question/answer with a through table"
2012 Sep 29
0
rails 3.2 nested form names not correct
I have a person has many questions model, I have accepts_nested_Attributes
set up properly. the question from the db show up, but the index is not
incrementing:
<%= f.fields_for :person_questions do |pregunta| %>
Questions: <br/>
<% Question.all.each do |question| %>
<%= render ''questions/question_type'', :pregunta =>
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 =
2016 Oct 11
3
[test-suite] making polybench/symm succeed with "-Ofast" and "-ffp-contract=on"
On Mon, Oct 10, 2016 at 5:02 PM, Hal Finkel <hfinkel at anl.gov> wrote:
> ----- Original Message -----
>> From: "Sebastian Pop" <sebpop.llvm at gmail.com>
>> To: "Hal Finkel" <hfinkel at anl.gov>
>> Cc: "Sebastian Paul Pop" <s.pop at samsung.com>, "llvm-dev" <llvm-dev at lists.llvm.org>, "Matthias
2016 Oct 12
4
[test-suite] making polybench/symm succeed with "-Ofast" and "-ffp-contract=on"
On Tue, Oct 11, 2016 at 10:39 PM, Sebastian Pop <sebpop.llvm at gmail.com> wrote:
> On Tue, Oct 11, 2016 at 10:20 PM, Hal Finkel <hfinkel at anl.gov> wrote:
>> ----- Original Message -----
>>> From: "Renato Golin" <renato.golin at linaro.org>
>>> To: "Sebastian Pop" <sebpop.llvm at gmail.com>
>>> Cc: "Hal
2006 Jan 04
4
many to many link table compound primary key explosion
Hi,
I have a many-to-many relationship between two tables, questions and
answers. My MySQL schema for the link table creates a primary key from
the two fields to prevent duplicate records. When I add the same answer
to the same question more than once, rails attempts to create a
duplicate record and explodes with a MySQL error:
MysqlError: Duplicate entry ''3-3'' for key 1:
2006 Jul 08
4
Hidden fields in forms
Please can someone show me the correct syntax for a hidden field in
forms, this is my code
<%= start_form_tag :action => ''create'' %>
<div class="form1">
<table width="auto" boader="8" cellspacing="5" cellpadding="5">
<% hidden_field ''line_item'', ''client_id'', :value
2016 Oct 10
2
[test-suite] making polybench/symm succeed with "-Ofast" and "-ffp-contract=on"
Hi,
I would need some help to fix polybench/symm:
void kernel_symm(int ni, int nj,
DATA_TYPE alpha,
DATA_TYPE beta,
DATA_TYPE POLYBENCH_2D(C,NI,NJ,ni,nj),
DATA_TYPE POLYBENCH_2D(A,NJ,NJ,nj,nj),
DATA_TYPE POLYBENCH_2D(B,NI,NJ,ni,nj))
{
int i, j, k;
DATA_TYPE acc;
/* C := alpha*A*B + beta*C, A is symetric */
for (i = 0; i < _PB_NI; i++)
for (j = 0; j < _PB_NJ; j++)
{
2006 Mar 08
0
Unit tests dynamic finders
Hi all,
I am having a problem with unit tests. Whenever I have a dependency
between two models (B depends on A) deleting A should also delete B.
This is simple with the dependent parameter in the model file of A. But
when I write a test the dependency seems to work, I can''t find the
answer with id 1 anymore(Answer.find(1)). But I appearently _do_ find it
with
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,
2008 Mar 31
2
Rails and Partials
Excuse my ignorance on partials but.....
I am trying to use partials to create a uniform display box built with
html tables. The only way I have thought about accomplishing this is to
create two partials:
_start_box.erb
----------------
<table id="box" width="<%= width %>"><tr><th><%= h(label_text)
%></th></tr><tr><td>
2002 Aug 13
1
mdct.c pointer to array conversion
Hi all,
I'm attempting to convert all the pointers to arrays the mdct_backward
function so it can be partitioned off for a hardware implementation.
Although this code is quite short I'm finding it a little tricky.
As it stands, mdct_backward is passed values by reference i.e.
void mdct_backward(mdct_lookup *init, DATA_TYPE *in, DATA_TYPE *out)
o my modified version starts
void
2007 Mar 16
0
libswfdec/swfdec_loader.c libswfdec/swfdec_loader.h libswfdec/swfdec_loader_internal.h libswfdec/swfdec_net_stream.c libswfdec/swfdec_root_movie.c libswfdec/swfdec_xml.c
libswfdec/swfdec_loader.c | 91 +++++++++++++++++++++++++++++++++++--
libswfdec/swfdec_loader.h | 13 +++++
libswfdec/swfdec_loader_internal.h | 2
libswfdec/swfdec_net_stream.c | 1
libswfdec/swfdec_root_movie.c | 4 +
libswfdec/swfdec_xml.c | 9 +--
6 files changed, 111 insertions(+), 9 deletions(-)
New commits:
diff-tree
2016 Oct 12
3
[test-suite] making polybench/symm succeed with "-Ofast" and "-ffp-contract=on"
----- Original Message -----
> From: "Renato Golin" <renato.golin at linaro.org>
> To: "Sebastian Pop" <sebpop.llvm at gmail.com>
> Cc: "Hal Finkel" <hfinkel at anl.gov>, "Sebastian Paul Pop" <s.pop at samsung.com>, "llvm-dev" <llvm-dev at lists.llvm.org>,
> "Matthias Braun" <matze at
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 Jul 12
7
Failure in comparisons
I''m basically a Ruby noobie.
At the moment I''m having a fair bit of trouble trying to figure out
what''s going wrong here (partial template):
<%=
@project = Project.find(@the_id)
if current_user.userid == @project.client
hidden_field ''messages'', ''recipient'', ''value'' =>
@project.project_manager
2006 Mar 10
0
Multiple radio buttons for defining multiple objects?
Hi, I''ve been working on a multiple choice Question/Answer system. The
response object (analagous to a lineitem) has a question_id, user_id,
and the actual response. What''s a good way of making a form with
multiple response objects which are created from the radio_button
helper?
Right now I''ve got the following code:
2011 Apr 21
0
Get data from 2 tables
Hi, i have 4 tables: questions, answers, users, and inquiries
(relationship)
def index
question_id = params[:id].to_i
question = Question.find(question_id)
@answers = question.answers
respond_to do |format|
format.ext_json { render :json => @answers.to_ext_json(:class =>
Answer) }
end
end
I have several scaffold in extjs, when I click on row, i get
2002 Aug 29
0
yet another MDCT question
mdct.c, lines 436 onward (part of mdct_backward) state
{
DATA_TYPE *oX1=out+n2+n4;
DATA_TYPE *oX2=out+n2+n4;
DATA_TYPE *iX =out;
T =init->trig+n2;
do{
oX1-=4;
oX1[3] = MULT_NORM (iX[0] * T[1] - iX[1] * T[0]);
oX2[0] = -MULT_NORM (iX[0] * T[0] + iX[1] * T[1]);
oX1[2] = MULT_NORM (iX[2] * T[3] - iX[3] * T[2]);
oX2[1] =
2008 Aug 11
1
Unexpected parameter problem using rsaga.geoprocessor() {RSAGA}
Hello,
I discovered SAGA, an interesting free GIS, a few days ago and now, I
would like to use it from within R 2.6.2 using the RSAGA package. I read
the documentation for this package and thought that I understood it
correctly for trying to call some of the SAGA modules. For getting the
information on the usage of and arguments required by the SAGA command
line "Import Binary Raw
2006 Jul 04
1
Smart html output for an object?
Hi, I''m trying to make it so that an object can be easily printed into
the html format I want. I''ve been focusing on using a case/when control
structure, so let me start by showing you some code... I was trying to
use this following code as a helper method,
def print_question(question)
@question = question
case @question.question_type.code
when