similar to: Rails is losing key information

Displaying 20 results from an estimated 400 matches similar to: "Rails is losing key information"

2006 Apr 01
0
Okay, what gives? find_by_id is failing.
This has the look of a "just don''t quite get it yet" problem. I am using the ActiveRecord.find_by_id method to identify the parent object (Quiz) to tie to the child object (Question) at create time. Here is the stdout log: 127.0.0.1 - - [31/Mar/2006:22:43:22 CST] "GET /question/new? parent_quiz=ff2d7022-be0a-11da-9f01-00400506faf5 HTTP/1.1" 200 806
2006 Jul 14
3
Rails newbie: How does the submit_tag work?
I would appreciate any and all input. The Agile book is not useful in this context. :o( As near as I can tell, it doesn''t work at all. I would expect that clicking on the [Next Question] button in the browser would fire the next_question method in the current controller. Instead, it (apparently) does nothing. The tag in question <%= submit_tag ''Next
2006 Jun 03
12
How to get dynamically created inputs from html form back to rails app
Thank you in advance. Although I have many years of experience in general, including cross- platform processing, I am not an HTML/Javascript programmer. As a result, I do not have certain specific baseline skills and/or knowledge that are presumed in the Rails and Ajax documentation. I am experienced with DOM manipulations, so the bare mechanics of manipulating the browser GUI via Javascript
2006 Mar 28
1
Rails generates query with reserved word for field name
For some reason, rails is generating this SQL: SELECT FIRST 1 * FROM questions WHERE (parent_id IS NULL) ORDER BY position DESC 1. There is no column named position referenced in my code. 2. POSITION is a reserved word in SQL92. It is the name of a string function that returns the offset of one string within another. I believe that this is a bug in Rails. Either position should be
2006 Mar 15
8
Tags to ruby interface: What I am missing? (repost)
I offer my apologies in advance for the repost. On a list as busy as this, it is sometimes easy to get missed in the shuffle. I am trying to create, display and edit a referenced object''s text field on the same view as my root object. For example: ------------------------- Quiz: <<quiz.name>> Preamble: <<quiz.preamble_presentation.text>> Postamble:
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
2006 May 14
3
need help for simple form tag (noob)
when the user click on "Search" I would like it to point to http://curentpage/?filter=searchtext (the filtering code is already written) it would look like this: <%= start_form_tag(url_for_options = {<something>}) %> <%=text_field (<my_filter>) %> <%= submit_tag(value = "Search")%> any idea how to do this? thanx in advance
2009 May 22
1
[PATCH server] fixed smart pool 'save' regression.
The recent refactoring didn't work properly for new smart pools, so I've cleaned jup the parameter handling for the various pool 'create' actions. Signed-off-by: Scott Seago <sseago at redhat.com> --- src/app/controllers/hardware_controller.rb | 5 +---- src/app/controllers/pool_controller.rb | 6 ++++-- src/app/controllers/resources_controller.rb | 6
2014 Nov 24
0
Re: [PATCH] v2v: -i ova: Remove incorrect warning for disks that have no parent controller (RHBZ#1167302).
On Monday 24 November 2014 16:01:36 Richard W.M. Jones wrote: > Don't assume every disk <Item> has a <Parent> field. For floppy disks > this is not the case. > > Thanks: Junqin Zhou > --- > v2v/input_ova.ml | 14 ++++++++++---- > 1 file changed, 10 insertions(+), 4 deletions(-) > > diff --git a/v2v/input_ova.ml b/v2v/input_ova.ml > index
2014 Nov 24
3
[PATCH] v2v: -i ova: Remove incorrect warning for disks that have no parent controller (RHBZ#1167302).
Don't assume every disk <Item> has a <Parent> field. For floppy disks this is not the case. Thanks: Junqin Zhou --- v2v/input_ova.ml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/v2v/input_ova.ml b/v2v/input_ova.ml index 95af2e5..9a9c10a 100644 --- a/v2v/input_ova.ml +++ b/v2v/input_ova.ml @@ -187,14 +187,17 @@ object for i = 0 to
2005 Nov 25
2
acts_as_list with 2 fields in the scope
Hi Railers, I''ve got a Categories table. I want it to act as a list within the scope of the parent_id AND the site_id. Categories table : id label site_id parent_id So, in my Category class, I have : acts_as_list :scope => ''site_id = #{site_id} AND parent_id = # {parent_id}'' The problem is that when I try to move_up a Category with a parent_id that is null,
2005 Jan 07
3
multicolumn primary keys in activerecord
hi, I''ve got the following tables in mysql notation: CREATE TABLE `nodes` ( `id` int(11) NOT NULL auto_increment, `parent_id` int(11) default ''0'', `group_id` int(11) default ''0'', PRIMARY KEY (`id`), ); CREATE TABLE `groups` ( `parent_id` int(11) NOT NULL default ''0'', `id` int(11) NOT NULL auto_increment,
2005 Jul 25
2
acts_as_tree and traversing parent/child relationships
I am working on an Rails application that uses a pretty complex category structure through out the site. I have defined a table to house all the info and a FK to reference parents within the table CREATE TABLE categories ( id int(11) NOT NULL auto_increment, name varchar(50) NOT NULL, parent_id int(11) default NULL, constraint fk_category_id foreign key (category_id) references
2012 Apr 17
0
Request for adding an "alias"/"as" to ActiveRecord
I often find myself in situations where I''m fighting against ActiveRecord because there is no easy way to alias some tables. For example, I''m converting a legacy application. So, there is a ''condition_type'' table that actually should be something like ''fields''. Also it can have a parent field and deletion is handled by setting a
2006 Jun 16
1
sortable acts_as_tree with heirarchy
I''ve been stumbling on the tut at oriontransfer (http://wiki.oriontransfer.co.nz/main/show/SortableTree) I''ve got it working in a one dimensional list and I''ve got the drag and drop working on children, but as can''t get it to save the tree. Here''s my view: <h2>Menu Prototype 2</h2> <%= flash[:notice] %> <ul
2006 Feb 08
1
Many-To-Many w/acts_as_tree?
Guys, I''m having a problem getting acts_as_tree working. It seems from the Agile book (p. 255) that acts_as_tree only supports one-to-one record relations, whereas I need many-to-many support. In other words, looking at the picture at the top of page 256 where where only 1 id is linked to 1 parent_id, I need multiple id''s linked to multiple parent_id''s - for
2009 Feb 20
0
Nested set - problems when creating child item
Hi, I''ve created a Model with Better Nested Set, but i''m having problems to create child items My workflow is: - In the (new) form, i pass the desired parent_id in a hidden field. - In the create action, i create the register and after saving it i use the move_to_child_of method. Everything works! My only problem is that Rails warns that I can''t mass asign the
2009 Feb 19
3
Associated child records not created on creation of a parent.
I am trying to create a record with association. Within the create method, I would also like to pre-populate dependent (has_many) records from a template in the database. The child records are <u>mysteriously rolled back </u> if I insert them in a loop. If I try to insert a single child record, it works.I have read the books and tried to google my way out of this but am at a dead
2006 May 07
3
Stupid newbie question
Here''s a request string which has a value I want to pull out from the category array - parent_id. Parameters: {"category"=>{"name"=>"Condiments", "parent_id"=>"1"}, "commit"=>"Create"} How do I reference that subelement in the receiving script? I''ve tried params[:parent_id]
2007 Oct 01
0
View Spec - Misbehaving
I''m trying to write my first view spec; I''ve done some controller specs with integrated views, but thought that isolating the views for some of these tests might be nice. So I wrote this: > describe PlayerContainer, "show" do > > PARENT_ID = 12 > CHILD_NAME = ''Child Name'' > PARENT_NAME = ''Parent Name'' > >