similar to: Which is the best place to put business logic ?

Displaying 20 results from an estimated 200 matches similar to: "Which is the best place to put business logic ?"

2005 Mar 06
8
Tutorial about XMLHttpRequest+Rails
Hi All I just finished writing up a tutorial relating my experience developing a system to edit line-items ''in-line'' in my Rails application using XMLHttpRequest. I thought this might be of interest to some readers of this list... Check it out at http://hieraki.goodlad.ca/read/book/1 Thanks! Dave -- Dave Goodlad dgoodlad-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org or
2006 Feb 24
7
One To Many To Many
Hey all, I''m trying to find a simple way to reference all of the objects that belong to their parent''s parent. In other words: Clients --> Orders --> LineItems How do I get all of a client''s lineitems in one array (i.e., client.all_lineitems)? Thanks! -Neal -- Posted via http://www.ruby-forum.com/.
2006 Aug 16
4
New Model Object from Existing Model Object
Hey Guys, need a hand again.... Lets say I have an Order... and an Order has Order Lines and Order_Lines have Items... I want to create a New Order, which would have New Order Lines with the same Items... Is there a fast / easy way to do this, w/o having to create a new order, loop through all the order lines, and create them associating them with the Items? Any help would be great, thanks --
2003 Jan 08
2
Problem with fontsize of pie-chart in postscript file
Hi all, I've a problem with the size of the labels of my pie-charts when I try to write them to a postscript file. I need to increase the default size, so I change cex (see below). On screen this works fine, but cex doesn't seem to affect the postscript-file. Any suggestions? Thanks a lot, Daniel Copy/Past-example (will try to write to c:/temp!): labels <- c("I",
2006 Aug 02
7
Same error ... again.
I reached page 82 of the Book "Agile Development with Rails" First Edition. After I compiled the code I got the following error message. [CODE] NoMethodError in Store#display_cart Showing app/views/store/display_cart.rhtml where line #11 raised: undefined method `product'' for 1099.0:Float 8: <table> 9: <% 10: for item in @items 11: product = item.product 12:
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 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
2009 Apr 01
3
Nil being coerced to float
I was doing this: @line_items = LineItems.find_all_by_invoice_id(params[:id]) @payments = Payments.find_all_by_invoice_id(params[:id]) @total = @line_items.sum{ |item| item.cost } @payment_total = @payments.sum{ |payment| payment.value } @balance = @total - @payment_total But when no payments had been made it was coming up with an error when trying to sum nil, so I did
2009 May 27
4
Sale, pop and product
Hi, I couldn''t find a better word for pop, but let''s go: There are 3 models: sale, pop and product sale: -total:integer pop: -quantity:integer -discount:float product: -name:string -price:float A sale can have many different products, each one has a quantity and discount associated. So each sale has_many :products through => pops And each product has_many :sales
2007 May 26
14
[Bug 570] PREROUTING is unaware of VLAN interfaces
https://bugzilla.netfilter.org/bugzilla/show_bug.cgi?id=570 kaber@trash.net changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID ------- Additional Comments From kaber@trash.net 2007-05-26
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
2008 Jan 19
1
Decimals are being converted to Bigdecimals!!!!!
Hi all, I''m working on a financial app, and have set up some columns in my tables as decimals with precision => 8 and scale => 2. My migration looks like: change_column :lineitems, :price, :decimal, :precision => 8, :scale => 2 change_column :payments, :amount, :decimal, :precision => 8, :scale => 2 I''ve run the migration and restarted the server. I
2006 Jul 31
5
can someone explain RoR MVC from a C++ or Java perspective?
is a model similiar to a class? and active record is similiar to how Java classes inherit from Object? View is nothing more than an output of a model with HTML? Controller is basically the Main part of the program? -- Posted via http://www.ruby-forum.com/.
2019 Jul 11
6
Glue to connect two nodes in LLVM backend
Hello everyone, I wanted to attach a node without affecting the present nodes in any way. I tried to use MVT::Glue for that but I think I'm missing something as I could not achieve the below state. LUI LUI | | ADDI ----GLUE---- ADDI | store I've few question about this and Glue node in general, I'll be happy to get some help on
2008 Jul 25
3
How to get a sense of VM pressure
I'm thinking about ways to improve the Xen balloon driver. This is the driver which allows the guest domain to expand or contract by either asking for more memory from the hypervisor, or giving unneeded memory back. From the kernel's perspective, it simply looks like a driver which allocates and frees pages; when it allocates memory it gives the underlying physical page back to the
2008 Jul 25
3
How to get a sense of VM pressure
I'm thinking about ways to improve the Xen balloon driver. This is the driver which allows the guest domain to expand or contract by either asking for more memory from the hypervisor, or giving unneeded memory back. From the kernel's perspective, it simply looks like a driver which allocates and frees pages; when it allocates memory it gives the underlying physical page back to the
2016 Jan 25
6
Just need to vent
Once upon a time, Peter Duffy <peter at pwduffy.org.uk> said: > The thing which always gets me about systemd is not the thing itself, > but the way it was rolled out. When I first installed Red Hat 7, if a > window had appeared telling me about systemd and asking me if I wanted > to use it, or stick with the old init framework, I'd have opted for the > latter (as I was
2008 Jul 19
1
Re: Winelib: How can I compile a Borland C++ Builder application
N?stor Amigo Cairo wrote: > Hi! > > I'm new to winelib. I'm trying to port a Borland C++ Builder 6.0 > application, but I need VCL library: vcl.h. > > Any ideas?? I would want to make it run natively on Linux. You can't. Winelib still requires Wine to run it. It's a library not an executable. If you want to write native Linux application that can run by itself
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
2010 Mar 03
1
[RFC][ PATCH 3/3] vhost-net: Add mergeable RX buffer support to vhost-net
This patch glues them all together and makes sure we notify whenever we don't have enough buffers to receive a max-sized packet, and adds the feature bit. Signed-off-by: David L Stevens <dlstevens at us.ibm.com> diff -ruN net-next-p2/drivers/vhost/net.c net-next-p3/drivers/vhost/net.c --- net-next-p2/drivers/vhost/net.c 2010-03-02 13:01:34.000000000 -0800 +++