similar to: pimp my code?? Using self.new in class methods, brittle design & testing such methods

Displaying 20 results from an estimated 4000 matches similar to: "pimp my code?? Using self.new in class methods, brittle design & testing such methods"

2006 Jul 19
1
Testing the flash is brittle?
Hello all, I seem to have an annoying habit of realizing that I''ve asked a question with a blindingly obvious answer just after I''ve asked it but here goes. I''ve noticed that in my functional tests there''s the occasional reliance on the contents of the flash. For example, I have an action that confirms a users identity and may reject them because A)
2007 Mar 06
0
[PIMP] Topfunky''s httperf PeepCode screencast
Hey Everyone, Topfunky (Geoffry) has created a great PeepCode screencast on using httperf to performance measure your web applications: http://nubyonrails.topfunky.com/articles/2007/03/05/peepcode-page-caching-and-httperf http://peepcode.com/products/benchmarking-with-httperf Topfunky put a ton of work into this and really got it right. The attention to detail is very good and he researched
2020 Sep 17
0
[PATCH v2 00/18] drm/i915: Pimp DP DFP handling
On Tue, Sep 08, 2020 at 02:34:24PM -0400, Lyude Paul wrote: > With the nitpicks addressed (note there were a couple of other spots where we > wanted to use Return: in the kdocs, but I didn't bother pointing all of them > out), all but patch 07 is: > > Reviewed-by: Lyude Paul <lyude at redhat.com> Thanks for the review. I fixed up the missing/bad docs and pushed the lot
2006 Jul 21
1
How to dynamically add more rows and submit data
Let''s assume that I am trying to build an application where the user can enter invoice. In the app the user can add lines items. Each line item has decription, date, rate and hours. When the invoice screen comes up the first time I have one blank row for the line items. <tr> <th>Description</th> <th>Date</th>
2006 May 03
1
brittle IAX connections ?
Hello, I have several asterisk 1.2.7.1 servers connected through iax2 and often the local asterisk would no longer see the remote one, even thought the link is high quality and the ping is perfect. Is there some issues to take into account about IAX2 connections? Is asterisk's DNS resolution too fragile and should I use raw IP's in my configs? Thanks for any help (I'm in hot
2007 Jan 05
4
How To Spec Controllers with Finders
Given this code (which renders rjs), I''m faced with the fixture- driven way of spec-ing or mocking. How the heck to you mock this so the code at line (2) and (4) work right? I''m still struggling with mocks but it seems like this can be done. Forgive the naivety of this question. 1. def change_quantity 2. @line_item = LineItem.find_by_id(params[:id]) 3. unless
2013 Nov 28
2
Dovecot's brittle configuration syntax
Hi there, Whilst trying to come up with a minimal configuration for Dovecot: http://dabase.com/blog/Minimal_Dovecot/ I noticed the configuration syntax is a bit admin unfriendly. It's easy to get an infamous Error code 89. Is there any back story to the grammar or language this configuration is in? Kind regards,
2007 Aug 07
0
has_and_belongs_to_many polymorphic question
I''ve got a situation where I''m trying to model the following relationship: a ''page'' has multiple lineitems a ''lineitem'' can be either a ''page'' or a ''entity'' The ''lineitem'' looks like it should be polymorphic but the ''page'' and ''lineitem''
2007 Mar 06
4
[PIMP] Topfunky''s httperf PeepCode screencast (Zed A. Shaw)
Hi, Thanks Zed - this is very interesting. One item in particular caught my eye: Does anyone on this list have any comments or validation that Rails 1.2.1 is 2-4 times as slow as Rails 1.1.6? Topfunky provided a link that purports what looks like really horrible performance and memory characteristics for Rails 1.2.1, even v. 1.1.6:
2006 Jul 17
1
Updating multiple children from one page
Hello, I have a model called invoice and one called lineitem. An invoice has_many lineitems, and an lineitem belongs to an invoice. I have a model method that calculates the price of a lineitem, and one that calculates all lineitems in an invoice. I want to have an edit page that lists all the invoices lineitems and their calculated prices, with a text field for a person to change the
2006 Feb 16
9
association not inserted automatically.
Hello, I am trying to write a sample application. I have class LineItem< ActiveRecord::Base belongs_to : order end && class Order < ActiveRecord::Base has_one :line_item end Now in the controller i am trying : def add @ord = Order.new(params[:ord]) @ord.line_item = LineItem.new(params[:lineitem]) if @ord.save redirect_to :action => ''list'' else render
2006 Nov 22
1
Polymorphic Data Modelling Question
Hello, I am not sure of the best way to model this situation in Rails and would appreciate some guidance. An order can hold multiple line items. Each line item is for a certain number of any given product. There are four products, each in a different table because they have completely different attributes. So I have: Order - has many LineItems LineItem - belongs to an Order
2006 Aug 08
1
Legacy system belongs_to problem
Hi all, I am trying to patch a small rails app into a large system we have at our company. The legacy has a large database that naturally does not match the Rails conventions, but this has not been a serious problem thanks to rails flexibility. The problem I just ran into is that my "LineItems" table links back to the "Products" table using a modified foreign key. For
2006 Dec 07
2
Problem saving parent and children using belongs_to, class_name, and foreign_key
Hi, I have a real simple association setup here that''s just trying to: - Create a new PayjunctionOrder - Create some LineItem objects and assign them to the PayjunctionOrder - Save everything I''m using Rails Edge. ---- class PayjunctionOrder < ActiveRecord::Base has_many :line_items end ------------------ ---- class LineItem < ActiveRecord::Base belongs_to :order,
2008 Sep 02
5
Appending a record to a table
Hi I''m not too sure how best to explain this but here goes! I am trying to write an appointment system. I have, through example, just about got the dynamics correct. Even tried to play with some table joins (and excuse me if I''ve used the incorrect terminlogy). But no matter what I try I can''t seem to get the following code to work. I have a cart filled with Treatment
2006 Aug 07
0
Re:
>From: Josh Kieschnick <jjkiesch@...> >Subject: Re: "Undefined method" problem in "Agile Web Development Wit >Newsgroups: gmane.comp.lang.ruby.rails >Date: 2006-03-22 04:39:56 GMT (19 weeks, 4 days, 23 hours and 8 minutes ago) >I am working through that book as well. I am getting the exact same >error. I thought it was something I did wrong but I have no
2006 Jul 20
1
Having issues saving line items to the DB
Hello everyone, I''m fairly new to Rails (writing my first real app) and brand new to this mailing list. I''ve got a rails/sql error I just can''t seem to solve. It''s probably really simple, but I''m been googling and reading for a day and have made zero progress on it. Hopefully someone on this list can shine some light on my problem, or point me in the
2006 Apr 20
0
problem in "depot" app - cart contents not shown on checkout
Hi all - I''m working my way through the "depot" tutorial. I''m having a problem with the section where the cart contents are displayed on the order page. The cart contents display fine after I add an item to the cart, but simply does not show up on the order page. Any help would be appreciated. I''m running Locomotive 1.0.0c on Tiger with MySQL from
2006 Feb 27
1
Odd problem in Agile tutorial
I am getting an undefined method error in my cart.rb class when trying to find in an array. I cannot see what my error is. Perhaps a view more eyes can help me with this: #--------------------------------------------------------------- 1 class Cart 2 3 attr_reader :items 4 attr_reader :total_price 5 6 def initialize 7 @items = [] 8
2006 Apr 20
5
strange mysql problem
i have this model: class LineItem < ActiveRecord::Base belongs_to :quote end in the console: >>l = LineItem.create ActiveRecord::StatementInvalid: Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' , , , )'' at line 1: INSERT INTO line_items (`qty`, `quote_id`,