similar to: What am I doing wrong!!!

Displaying 20 results from an estimated 10000 matches similar to: "What am I doing wrong!!!"

2006 Jan 03
4
Would someone like to tell me why this code will not solve my problem? (it''s short)
I am building an invoicing system but cannot use the auto_increment field to determine the invoice number (because they are running 3 different companies off the one system. I need to find the last invoice number from any given company and then add 1 to it to get the next invoice number. BUT, there is a unique case on the very first invoice produced because there is no earlier invoice
2006 Jan 01
11
Can rails make use of accesskeys?
I added :accesskey=>"D" to the html options hash of my link_to tag but nothing happened. Should I keep trying or is this not an option yet? bruce
2010 Aug 02
5
What do you use for Invoicing?
Hi Everyone, Sorry, if it's not directly related to Asterisk. Some of people on this list might have PBX deployed for their clients. What software do you use to invoice them so the invoice looks like a proper telecom invoice maybe? Prefer: -opensource with Windows binary available. -able to create .pdf invoices rather than printable ones. Thanks -------------- next part -------------- An
2006 Jan 29
16
counting rows via associations
Hi: I have a table called clients and each client has many lists (a has_many and belongs_to has been created in the class. What I need to do is get a count of the rows in each list for each client. I was hoping I could do something like client.lists.count but it does not seem to work. Any suggestions? bruce
2006 Feb 10
1
Eager loading issue
I have three tables, Invoices, Projects, and Managers. Each manager has many projects. Each project has many invoices. When displaying a list of the invoices, I am using: Invoice.find(:all, :include => [:project]) Since the list shows information from the project table. (For example, a table showing Invoice Date, Project Name). However, I''d also like to show the manager name.
2006 May 31
1
find by sql
Hi I have the following code, which makes use of an sql statment to get the results required. However this just doesnt seem right for rails, as ive managed to develop the whole project without using any other pure sql. Is there a cleaner way of doing this, but gaining the same results. thanks scott #sql to find all invoices pSql = "SELECT DISTINCT invoices.id,
2018 Apr 10
3
Invoice numbering for customers
Just wanted to ask a quick question here. I am running GNUC 2.6.12 and when I create a invoice for a customer I have to enter an invoice number. I was thinking perhaps there is setting somewhere that I missed to get it to automatically fill in a invoice number? Id hate to have invoices with the same invoice number since I have to manually type them in right now. Thank you, jdegraw
2005 Dec 31
6
I don''t even know how to ask the question (4 lines of code)
I create a hash using this line of code @x = Account.find(:all) I then want to go through each element in turn and add a key value pair to the end of it. I thought this would work, but it does not. @x.each do |a| a.merge({"balance"=>50} I used merge because I thought ''a'' would be a hash (how do you find out the type of an object?) I then guess it was
2006 May 19
7
AR transactions and isolation levels
I''m trying to create a sequence with no gaps in my db (contrived example, but should work out the same as my real one), and believe db-managed transactions are the way to go about this. It''s my first real ''go'' at transactions, so I may be mistaken about how things really work. Anyway.. Consider this example code: Class Invoice < ActiveRecord::Base def
2006 Jun 20
1
ActiveRecord saving madness?
Hello, First of all, I love RoR. I am studying it, and I am finally "getting there". However, I do have a bit of a problem with ActiveRecord''s saving behaviour. Imagine to have Orders (id, name) {has_one:invoice} and Invoices (id, order_id) {belongs_to :order} . If you type: invoice = Invoice.new(...whatever...) an_order.invoice = invoice if invoice fails to save, you
2006 Jan 06
3
Error Handling
Hi, I am doing a project on invoice. For that I have to use a page both for crating new invoices and for updation of existing invoices. The problem is that when an error occures, I can''t maintain the same page for error correction. How can I redirect it from the controller ? Or can I display ruby errors before submit of the page in ruby? Thanks.. Sainaba. -- Posted via
2006 Jan 19
3
A book we may wish to buy
Hi: Some French fellow posted a notice yesterday about a book that had come out. It''s called "Ruby on Rails" and is apparently by DHH & David Thomas. Is this a scam? If not, does anyone know where I can buy this book in English? I''ve searched the usual places but can''t turn anything up. Bruce
2006 Jan 22
3
dumping out mysql data only (no structure)
Is it possible? It is mentioned in AWDWR but I cannot find that option in the MySQL documentation. I can dump the whole db or just the structure, but I''d like to be able to dump just the contents. bruce
2006 Jan 06
8
How do I write a generator?
I''d like to take some advice and write a generator to change the scaffold.css. How do I do that? I looked on the wiki and googled it but have not found anything yet. Any help would be much appreciated. bruce
2006 Jan 02
5
How can one use GRUFF with locomotive ( I guess there is a wider question here, also)
Hi: I love Locomotive and use it exclusively for my rails projects. I''d like to install GRUFF and give it a try (a graph image creation package). I know I can do sudo gem install gruff from the command line for normal ruby and rails. How do I make gems available to Locomotive? bruce
2006 Jan 05
7
repost - Can one edit the file that generates the scaffolding.css?
I am reposting this because not only am I VERY interested in the answer but because I think it would also be useful to many, many people. We kind of have a house-style here, so it would be nice if the generated scaffold.css would accommodate that. My questions are? Is it possible? Is it safe? How? bruce
2005 Dec 24
2
Trying to grasp the difference between local variables and instance variables/
Hi: Would it be fair to say (or completely out to lunch) that a local variable is local to a method and an instance variable is local to an object. Thus an instance variable is a sort of limited global variable or super-powered local variable. Its scope is larger than a local but smaller than a global. Or that it is a global within a limited domain (the object). or is it a whole lot
2005 Dec 08
7
Help shut down webbrick on mac?
Hello, I just installed radrails and it will not run the webbrick because a version is already running on my mac. I do not know how to shut down the mac version. Thanks Regards, Frank Rocco farocco-H+0wwilmMs3R7s880joybQ@public.gmane.org
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
2005 Dec 30
3
Select SUM(?) Query
When using PHP, I was able to enter a query against my list of invoices such as : Select SUM(amount) from invoices where project="123" This would give me the total amount of all invoices for project 123. In rails, how would I do this? I tried using "find_by_sql," but couldn''t figure out how to extract the results out of this. Thanks!