similar to: data modelling

Displaying 20 results from an estimated 1000 matches similar to: "data modelling"

2006 Jan 06
2
IRB hex values
Hi all, Im working on a copy contact info into project method. Nosing aroundwith IRB I see a hex value. Named Contact:0x40ca01cc #<Contact:0x40ca01cc @attributes={"name"=>"GP-net", "id"=>"7", "lastname"=>"Petersen", "firstname"=>"Gerard"}> Why is it there like that and not in a human readable
2006 Jan 10
8
Noob: Child records not saved
Hi all, happily coding along, but it seems a belongs_to record is not saved. # Create some stuff def create_project @contact = Contact.new @project = Project.new(@params[''project'']) @project_contact = ProjectContact.new(@params[''collect'']) @project.project_contact = @project_contact contact =
2006 Jan 08
4
ID from child table not handled by AR
Hi all, Im slowly moving forward, but there''s something a miss. I can save some relational records to tables, but only once. For an unknown reason, the primary key (id) of the child table is not automatically increased. (I can only perform one save, (the first records id field holds the value ''0'') and during the next save it says: Mysql::Error: Duplicate entry
2006 Jan 09
2
catch id from form and copy between objects
Hi all, Not completely sure what I''m doing, but I need to get data from another table based on and id. Below is some breakpointer output: irb> @params => {"project"=>{"project_description"=>"point2", "project_name"=>"break2"}, "action"=>"create_project",
2006 Jan 08
0
Debug on form submission
Hi all, Can I increase logging so that all vars, form id''s, hashes and what not are visible on a form submit? I know there''s IRB, but I don''t know what I''m looking for, so not what to dig up from the console either. Among other thing info related to AR, since this is something I run into: Mysql::Error: Duplicate entry ''0'' for key 1:
2006 Jan 05
7
HOWTO: Combine fields from 2 two tables in 1 object
Hi all, For a dropdownlist (showing "Company - FirstName Lastname'') I want to fill an object @project_contacts with "Name" from table Companies and "Firstname" and "Lastname" from table contacts. Any idea? Regards, Gerard. -- "Who cares if it doesn''t do anything? It was made with our new Triple-Iso-Bifurcated-Krypton-Gate-MOS
2006 Jan 10
15
KISS and DRY? Not even close!
Hi all, After working on my first rails app and having handed over some very sophisticated coding from a lot of you guys. My app does what I want it to do, but I''m no where near the end yet, and it seems that the KISS and DRY objectives already went down the drain. It could be lack of knowledge, only doing Ruby on (and) Rails for a month, but I''m stuck on the following:
2006 Mar 31
3
Updating to 1.1.0 crashes webrick on existing apps
Hi all, I''m (well was) running rails on debian. After the update to rails 1.1.0 newly created aps run great. But trying to start webrick for an old one makes me cry (see below). Any docs on how to ''migrate'' existing apps to the up and up? Thanx n Grtz Gerard. => Booting WEBrick...
2005 Dec 30
3
model - controller always one-on-one?
Hi All, Is it necessary to always have a controller per model? Rephrased: Would you end up jumping through hoops in the future if you have a controller called Customer in which you add methods to create new companies as well as new contacts? Thanx Regards, Gerard. -- "Who cares if it doesn''t do anything? It was made with our new Triple-Iso-Bifurcated-Krypton-Gate-MOS
2006 Jan 15
7
Include extra partial in layouts
Hi all, Does anybody know how to include a partial (next to @content_for_layout) in a layout file? I''m looking for a something like @partial_for_include => ''filename'' in my layout files. So a linked .rhtml file gets picked up from within a layout file. All my layout files (4 at the moment) have a <div class="navright"> tag, so one change in the
2006 Jan 02
2
Dynamic form tags
Hi all, I''m happily using "HowToReuseEditViewsForNewViews" found at: http://wiki.rubyonrails.com/rails/pages/HowToReuseEditViewsForNewViews There''s this comment there saying you only need the tag "<%= auto_form %>" when using the code below. Can somebody tell me if that will work when extending it with model_name (some how)? I have several new_*
2006 Jan 03
3
Engine and controller layout confusion
Hi all, Installed the login_engine which is working. But I''m confused as to how I tell Rails to use the "/app/views/layout" rhtml files, when partials from the login_engine are used from "/vendor/plugins/login_engine/app/views/user". Do I copy login.rhtml to /app/view/mgmt? (mgmt is a controller name in my app) Along the same line: I also have a nil error on the
2006 Jan 04
0
Browse doc apps from within app
Hi all, what would be the easiest way to browse the by ''rake appdoc'' generated html files from within your application? Grtz Gerard -- "Who cares if it doesn''t do anything? It was made with our new Triple-Iso-Bifurcated-Krypton-Gate-MOS process ..." My $Grtz =~ Gerard; ~ :wq!
2006 Jan 21
0
helpefying a list partial
Hi all, I''ve got this code which is alway the same. In a list it displays a show, edit and destroy icon behind each record. <% for todo in @todos %> <tr valign="top" class="ListLine<%= cycle("0","1") %>"> <td><%=h todo.prio %></td> <td><%=h todo.title %></td> <td><%=
2006 Jan 28
3
DRY conflict with "Updated at" "Created at" "Deleted at" in view
Hi all, Are there any helpers or so for listview routines that suppres the three above mentioned columns? I''m currently exploring something like the code below. But it feels like I''m doing Rails'' work. # just for test purposes <div id="debug"> <% for col in Product.columns.map %> <%= col.name %> - <%= col.type %><br/> <%
2006 Jan 04
0
Simple print statement (was: recongizing the current controller in views)
All (and kevin), After flying high for a while on Rails things, I''m down to the nitty gritty of Ruby stuff. Messing with vars and printing them out on a web page. I found the controller_path in the API docs; However when putting this in a controller: @test1 = controller_class_name @test2 = controller_name @test3 = controller_path And this in a partial: Test1 <%= @test1
2006 Mar 01
0
Spicy stuff on web development
Hi all, The link contains a stingy article on AJAX and other somewhat browser dependant stuff. http://techrepublic.com.com/5254-6257-0.html?forumID=99&threadID=184332&messageID=1963135&id=2926438 Being a webdev myself and also a diehard perfectionist, I could relate to some of it. Let me state that the article does NOT represent my opinion, nor is it to fire up a discussion!! It
2006 Jan 07
1
Difference in find_by
Hi all, Been digging to a lot of ruby docs to understand more of what Rails is exactly doing. Can somebody tel me what the difference in use is between the "@params" and "params". (I know the first is a instance variable and the second is a ''normal'' variable. What does this mean in pratical terms? @contact =
2006 Jan 14
1
controller_path says undefined local ....
undefined local variable or method `controller_path'' Do I need to install anything explicit? For the nosies, I''m looking for (building) a breadcrumb routine (as page independant/DRY-less as possible). Like "mods > crm > customer > add contact" Regards, Gerard -- "Who cares if it doesn''t do anything? It was made with our new
2006 Jan 22
0
Get colum types in auto form
Hi all, I''m trying to build a routine that generates table rows with the appropriate field types (text_area and text_field for now), and filters out the ''created_at'' and ''deleted_at''. <% for column in Project.content_columns %> <tr class="ListLine<%= cycle("0","1") %>"> <td><%=