Displaying 20 results from an estimated 200 matches similar to: "Is this possible?"
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
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 =>
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
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 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
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/.
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
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
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
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
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
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,
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
2006 Feb 18
14
Composite primary key support in ActiveRecord?
Hi,
As I understand, composite primary keys aren''t supported in
ActiveRecord yet. May I ask if there are plans for this feature?
Better yet, if this feature is under development, how''s the progress
going?
I''m not trying to use legacy databases. I tend to think that using
multiple integer column id''s (composite primary key) are often
natural way to
2006 Dec 08
19
HABTM join table quirk
I''ve been bringing up a good basica framework for applications at work.
To give decent security I''ve been implementing the Rails Recipie for
Authorization of function calls modeled on the book''s implementation.
(Changes for our environment were added..but are minor.)
Since I initially let Rails create the join table between two data
tables with a HABTM relationship....I
2006 Jun 29
0
Problem getting encrypted submit buttons working with the paypal gem and rails 1.1.2
I''m running Rails 1.1.2, and using version 1.9.0 of the paypal gem.
When I make unencrypted paypal forms, they work just fine, I get the
IPN notification from the sandbox and everything is wonderful. When I
try to encrypt the form though, all I get is the error message "We
were unable to authorize the transaction. Please contact your
merchant.", which is ... unhelpful.