Displaying 20 results from an estimated 1000 matches similar to: "Error Handling"
2006 Jan 20
2
Gruff image
Hi
I want astackedBar graph in my project I want to give it negetive axis,
scale, negetive values etc . How can I do that with gruff package?
Thanks..
Sainaba
--
Posted via http://www.ruby-forum.com/.
2006 Jan 23
3
Encrypt/ Decrypt password
Hi,
I have user add/edit forms.While creating a user I tried the following
method to encrypt password and stored the encrypted password in the
table.
def self.sha1(pass)
Digest::SHA1.hexdigest("#{salt}--#{pass}--")
end
But when I try to edit the page I get the encrypted password in the
password field instead of the decrypted password. Is there any method
to decrypt
2006 Jan 23
4
Delete row without th eid field
Hi all,
I have a table structure with me not having an id column. When I try to
delete the row i get an error ''Unknown column "table.id"''. Can i do the
action with any other method than destroy/delete? Or with the same
method and any other conditions?
Thanks.
Sainaba.
--
Posted via http://www.ruby-forum.com/.
2006 Jan 04
4
How to open a pdf file in new window
Hi all
I made a pdf file in ruby and to display it used the method send_data
like
#
send_data pdf.render, :filename => "Hello.pdf",:type =>
"application/pdf"
#
Now I want to open it in another window or as a popup. How can I achieve
it?
Thanks to all.
Sainaba.
--
Posted via http://www.ruby-forum.com/.
2006 Jan 17
1
How to validate expiry date
Hi
How can I do the validation of date expiry (if the date is less
than today) in ruby.Can I do it using the validate method or other def
in the model class?
Thanks in advance,
Sainaba.
--
Posted via http://www.ruby-forum.com/.
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,
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!
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 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.
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
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 03
3
What am I doing wrong!!!
Hi:
@x = Invoice.find(:first)
if @x
do one thing
else
do another
end
This ought to work but does not. I think that @x is nil but if I
test for existance or @x != nil or @x.attribute != nil - my code does
not respond correctly. What is the value of @x if there are no
records yet in the invoices table?
Thanks in advance.
bruce
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
2008 Jan 06
8
n00b question/issue
i know this is n00b but i have searched and i can not figure it out.
i am running instantrails on windows. i downloaded ajax_scaffold and
installed using script/generate in a new rails project. after
configing the db i can the following error when trying to access
http://localhost:3001/invoices/list (invoices is the controller/table
i built ajax_scaffold on)...
NameError in
2008 Jul 22
3
New apps for wine
Hi all this is my first post, so if I need to be directed to other places, thanks for the assistance in advance.
I,ve been attempting to wean my family off windoze for some time, and now have a few boxes and laptops running fc8.
I've set up the latest version of Wine and have successfully installed Myob v13 (with a few glitches: date format is not correct for Australia, despite altering the
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 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 Jun 06
6
Linking two tables using a lookup table
Hi,
How do I associate two different tables which have a lookup id (table)
as common.
I tried the has_many :table2, :through => look_up_table in my table1
model.
Any hints?
Thanks, Hari
--
Posted via http://www.ruby-forum.com/.
2005 Dec 16
4
Adding extra value to an object
Hello friends ,
I have a clear method here ::
def create
@invoiceitems = Invoiceitems.new(params[:invoiceitems])
@invoiceitems["invoice_id"] = params[:id]
if @invoiceitems.save
flash[:notice] = ''Invoiceitems was successfully created.''
redirect_to :action => ''new'',:id => params[:id]
else
render :action =>
2007 Sep 05
8
Hi..Guys new plugin again
Hi..
Guys new plugin again
Foreign Key Associations is a plugin that automatically creates
associations based on foreign-keys. The associations are created at
runtime-ie. as your ActiveRecord models are loaded-so they will always
be up-to-date.
For example, given a foreign-key from a customer_id column in an
orders table to an id column in a customers table, the plugin
creates: