similar to: HOW TO create a new record and its associated objects within the SAME PAGE

Displaying 20 results from an estimated 2000 matches similar to: "HOW TO create a new record and its associated objects within the SAME PAGE"

2006 Jun 28
3
Best way to structure this?
I''m thinking of an application in which a user can request for different items (like office stationery). So, I have a table of users and a table of requests. The thing is that depending on the item requested, the parameters are different - for example, pens may have {colour, width, type} while paper may have parameters such as {colour, size (A4, letter, legal), stack size,
2006 Nov 16
2
test unit approach?
I''m just getting back to looking at backgroundrb after a long hiatus since June. I''m looking at creating some workers but I''m a bit stuck as to how I should write tests for them. What''s the recommended approach for unit testing of workers? The project will ultimately be used by a Rails app but I''m comfortable developing the worker code as a
2006 May 21
12
TDD for Rails book?
It seems like half the people on this list are writing a book on Ruby or Rails. For all the hints I''ve seen strewn across the list I have yet to see one that will focus on test-driven development for either Ruby or for Rails. If anyone is looking for a topic, please consider this. I''ve been trying to wrap my brain around the TDD process, but its way of thinking is
2005 Jul 08
3
Problem with script.aculo.us 1.0
I just upgraded to the new version and now my storable containers are not working. here is my code. Sortable.create("leadstories", {handle:''handle'',tag:''div'',containment:''leadstories'',onUpdate: function(element) { new save_order(issueId,Sortable.serialize(element)); }}); Sortable.create("rightnav",
2006 Nov 22
3
RESTful web service design question
I''m working on a Rails app that needs to expose a RESTful web service. I''m curious to know some of the best practices as it relates to RESTful API design. Let''s say I have a set of related objects on the server side. I''ll use the venerable subscribers, subscriptions and magazines example to lay it out. class Subscriber < AR has_many :subscriptions
2006 Jun 16
2
need help mocking out a method
I''m trying to test a controller method''s error handling. To do so I need to mock out a method that normally returns a unique number so that it returns a duplicate number several times in a row thereby triggering the error handling. However, I can''t get the mock working. Here''s the test code along with the error (all from test/functional/
2006 Nov 18
1
ActiveResource sample code?
I''d like to play around a bit with ActiveResource for consuming a web service. Does anyone have sample code they would be willing to share? I''ve googled all around and have come up empty except for simple (non- working) examples given in the RailsConf keynote and some associated blog entries. Thanks! cr --~--~---------~--~----~------------~-------~--~----~ You received
2006 Jul 27
7
WebService
Hi all! how do I make a WebService using rails? thaks ! -- Cordialmente, Carlos J?nior <junior@boanoitebh.com> (31) 9244-6543 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060727/f52d1e1c/attachment.html
2006 May 21
3
acts_as_list scope and polymorphic association.
this is my model: class Person < ActiveRecord::Base has_many :phones, :as => :callable, :order => :position end class Phone < ActiveRecord::Base belongs_to :callable, :polymorphic => true acts_as_list :scope => :callable_id end how can i add the callable_type to the scope. how can i say the scope is the {:callable_id,:callable_type} couple? is it even possible? thanks
2006 May 18
2
How to debug the rendering in Rails?
Hi, I have some controller code like this: def mailing_lists @ml = MailingList.find_by_identifier(@params[:id]) @messages = @ml.messages @headers["Content-Type"] = "application/atom+xml" @response.headers[''Last-Modified''] = @messages.last.created_on.httpdateunless @ messages.empty? minTime =
2006 May 06
1
depot test-driven development exercise
(I posted this yesterday but within 20 minutes my thread was hijacked so I''m not sure anyone really saw this.) I''ve been working my way through the Agile book and just completed the depot sample application. I learned quite a bit along the way. On page 171 we are led through the creation of a test (that fails) for new code. The new code (a search function) is left as an
2006 Aug 07
9
[OT] Rails is built into OS X 10.5
This coming out of WWDC. Pretty cool to see this kind of thing happen. -- J "Brien" | HybridIndie Productions | http://hybridindie.com | hybridindie@gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060807/380ae29c/attachment.html
2006 Jun 06
4
no view involved...
The canonical example of using BackgrounDRb involves updating a progress bar on some user''s web page. Therefore, the long running background process has some affiliation with a view. How can backgroundrb be used for long running processes that are NOT associated with a controller/view? Is this even possible? I understand the nature of Rails is such that it does "just in
2006 May 22
2
good practice or waste of time?
I have what I hope is a simple question regarding a security practice I''ve been using in my first Rails app. I want to know if it''s worthwhile or if the extra typing isn''t worth it. I have 3 models that are related to each other. class User < AR:Base has_one :library end class Library < AR:Base belongs_to :user has_many :items end class Item < AR:Base
2007 Jan 23
4
Want feedback on Mongrel patch for handling partial PUT requests
By default, Mongrel will delete the HTTP request body and short circuit calling any handlers if a request is interrupted or incomplete. Unfortunately, this breaks any attempt to correctly handle a partial PUT. (BTW, PUT is *way* more efficient for uploads compared to POST which requires a MIME parsing step.) So, about a month ago I wrote up some patches to Mongrel 0.3.18 that allowed
2006 May 15
3
where do I put this test?
I''m trying to use TDD on a Rails app. So far (6 hours into it) things are going well. My data model is starting to get a little more complex now. I now have two related tables and I want to make sure my tests cover input validation, record creation, and the proper creation of the foreign key. Do I put this into a test unit for the parent table''s model? Or do I test this
2006 Nov 26
2
Writing a mod_put HttpHandler
I''m looking at writing a Mongrel handler that mimics the behavior of the Apache mod_put [1]. It allows for the streaming upload of very large (GB) files; it also supports resumable upload. Before I get too involved, I''d like to ask if my reading of the mongrel source code is correct, i.e. what I want to do isn''t currently possible. Looking at the class
2005 Jan 17
5
how to override rails errors messages?
hi, how can i override rails errors mesages (that are in english) to display them in an other language? thanks hangon
2006 Jun 05
2
Rails & SSL
I am somewhat new to rails and I need to know how to configure Rails to handle the https protocol properly. Could somebody point me in the right direction? Thanks Will Clark
2008 Jun 13
1
test - ignore
Verify I can successfully send to the list.