similar to: Adding extra value to an object

Displaying 20 results from an estimated 600 matches similar to: "Adding extra value to an object"

2005 Dec 16
3
Not able to put into a object variable
hello friends , I was trying to select all the invoice items from the table invoiceitems with a condition.But I am getting a NULL array .Please help me in fixing this :: @oldinvoiceitems = Invoiceitems.find(:all, :conditions => [''invoice_id = :invoiceid'', { :invoiceid => ''params[:id]'' } ] ) Thanx and regards, Naroor Rathish,
2005 Dec 16
2
Is this possible?
Hello Friends, def new @invoiceitems = Invoiceitems.new @oldinvoiceitems = Invoiceitems.find(:all, :conditions =>[''invoice_id = :invoiceid'', { :invoiceid => params[:id] } ] end Error is being shown in the line number with ''end''. This is for initialising a new invoiceItems object and also finding and storing all the invoice items for a
2005 Dec 15
12
Adding multiple invoice items to an invoice on the same form
Hi Friends , Got a unique requirement .I am designing a invoice printing system .So right now I have the NEW page for adding the invoice details to the table .Now I have the requirement of adding Invoice Items In the same form .I have added multiple text boxes to enter the values of the Items using <%= text_field ''invoiceitems[]'', ''item_price''
2005 Dec 23
1
key value pairs working
Hi, can anyone tell me how is the following lines in ruby works on rails .how is the key value pairs accessed by rails . params[:invoiceitem].each do |key, val| @invoice.invoiceitems << InvoiceItem.new(val) end Thanx and regards, Naroor Rathish, www.naroor.blogspot.com -- Posted via http://www.ruby-forum.com/.
2005 Dec 23
0
adding items to a particular invoice on the same page
Hi, I have been building a invoice generator(in ruby on rails) for the past some days and been stuck on the final page .This page will have fields for entering the invoice details and also I have added a AJAX effect so that fields for invoice items get created dynamically . its all design well but the issue comes when I am trying to save the page .That is adding ivoice details to invoices
2005 Dec 19
1
Disabling input Text box
Hi friends , I want to disable the text box we use in ruby on rails .How can I add the disabled keyword inside <%= text_field ''invoice'', ''inv_amount'' ,"size"=> 15 %> . I tried <%= text_field ''invoice'', ''inv_amount'' ,"size"=> 15 ,"disabled" %> Thanx and regards, Naroor
2006 Apr 07
2
Installing RoR locally
hi friends, How can i install ruby on rails locally .I mean I dont have internet access in my system and want to install Ror .Please help me out . Thanking you, Naroor Rathish -- Posted via http://www.ruby-forum.com/.
2005 Dec 20
0
Dynamic fields creation and accessing data
Hi friends , I was trying this code and finding some errors.I am trying this to implement dynamic creation of invoice items in invoices using AJAX .Please go thru . I added a partial :: <% @invoiceitem = invoiceitem -%> <%= text_field ''invoiceitem'', ''item_price'', ''index'' => invoiceitem_counter %> <%= text_field
2006 Jun 06
3
Invoice and invoice_lines
Hello People, I have a possibly very lame question. I am fairly new to RoR, and I want to make sure I do it "right". I have a model called Invoice, and one called InvoiceLines. Usual story: the table "invoice" has a 1:n relationship with "invoice_lines", which includes invoice_id. Now... the application will have a "new order" button, which will allow
2005 Dec 28
2
disabling text_field
Hi , Anyone knows how we can disable <% text_field %> . Thanx, Rathish -- 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 15
4
Newbie questions about Rails on Windows
My background is Windows development using Visual Studio and I''m trying to get up to speed with Ruby on Rails, so please excuse these basic questions. I''ve downloaded InstantRails and can run the sample application - so Apache, MySQL, Ruby etc. are working. Where''s the "development environment"? Where do I go to edit files, create models and controllers
2009 Jul 16
12
Find_all_by and find(:all) to only select certain values for a selection box
So....let''s have a look if I understood the issue: -Find_all_by is actually the same like Find(:all), however Find_all_by is much shorter and less complicated than the syntax of Find(:all) -So in my CONTROLLER it says @files = find(:all) however I don''t want to see all files displayed in my selection box, because I only want to see the foles whose mandant_id is the same like
2005 Dec 20
12
How to model "Expense Report" in Rails MVC
1st: I am a newbie to Rails & to pure OO. Q: I want to use rails for creating a "master-detail" form. page layout will allow users to type in an "expense report header" and as many "expense report lines" as they need to. I understand how to wrap the final submit action using "transaction" to ensure the inserts to the database happen within the same
2008 May 25
2
record will absolutely not save! so weird, please help.
I have a weird problem going on. All of sudden, records for a certain model will not save with #save Please take a look at this: >> p = Payment.new(:payment_reason_id => 1, :payment_method_id => 1, :date => Date.today, :amount => ''5.00'', :payable => Student.find(608)) => #<Payment id: nil, school_id: nil, payment_reason_id: 1, payment_method_id: 1,
2006 Jul 05
2
get value from array.
hi, Im running the following sql statment which returns 1 result. pSql = "SELECT sum(amount) FROM payments WHERE expected_pay_date LIKE ''"+pWholeDate+"%'' AND invoice_id IS null " aResult = Payment.find_by_sql(pSql) how can I get the result of this? (when doing @aResult.inspect it
2008 Jun 14
0
does BackgrounDRB not "know" the rails environment it is running within/in parallel with?]
Hi, it probably is a noob question but I''m confused by this error message: active_support/dependencies.rb:478:in `const_missing'': uninitialized constant Invoice::ApplicationController Situation: I have an InvoicesController with a create method that in turn calls upon a MiddleMan.worker(:billing_worker), which in turn finds an Invoice and calls upon @invoice.print_invoice
2005 Nov 18
10
[Request] file_column configurability
I wasn''t sure where to email this request, so I am hoping the author of file_column actually sees this. I was wondering if there were any plans to allow some configurability in the file_column plugin. By configurability I mean allowing the developer to define which table column is used as the unique identifier when creating image folders. Right now it seems like it uses the ID of the
2006 Feb 03
6
Rails from the command line
I have controller that processes data in one table and puts results in another. Now that its'' working, I would like to be able to run it from the command line ( read: windows batch file). How can this be done? It will be installed on a Windows box with InstantRails1.0, (if that matters). I will be doing more processes like this, so this is a good opportunity to get it right. -- Best
2005 Dec 23
10
Extending model
Hi, I''m looking for a way to extend one of my models to allow some level of abstraction between what goes into it and how it is stored. For example, say I have a Product and I want to set it''s price. A person using the website will type the price in euros. Internally, I''d like to store the price as an integer value of cents. I can currently do this with some ugly code