search for: quote_id

Displaying 16 results from an estimated 16 matches for "quote_id".

2006 Apr 20
5
strange mysql problem
...the console: >>l = LineItem.create ActiveRecord::StatementInvalid: Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' , , , )'' at line 1: INSERT INTO line_items (`qty`, `quote_id`, `price`, `lead_time`, `part_number`) VALUES(, , , , ) why is it doing that? all my other models that belong_to something work.
2006 Jan 30
0
Adding ActiveRecord objects to the session
...of unexpected behavior when adding ActiveRecord objects to the session. When I add the ActiveRecord object (in this case QuotePart) to the session it automatically saves the object that was added to the session to the DB. And the oddest part is that it automatically fills in the foreign key field quote_id, even though it is set to 0 at the time it is saved to the session. Here is the offending code, not the debugging statements; the first stament returns " - 0 - new" and the second statement returns "123 - 4 - DB" where 123 is whatever id was created and 4, as far as I can tell,...
2006 Jun 13
13
Pass infomation between different views and controllers
Hi, I am a rails and ruby nuby :-) How do you pass data between different controllers and views? I have a page ( a quote) that I am editing url ....quote/edit/6 6 id the current id. I then go to a catalog (url....catalog) to add an item to my quote (I do this via a line_item file that the quote reads) I now want to go back to the quote. I have tried this <%= link_to ''Back to
2006 Jan 20
11
HABTM relations
Hi, I have 3 tables with HABTM relation. USERS -> QUOTE_TO_USER <- QUOTES Table QUOTE_TO_USER has 3 attributes: quote_id, user_id, component. I have a form where I can tie multiple users to QUOTE. This is easy one, thru "user_ids" (@quote[:user_ids] = @params[:quote][:user_ids]). In this form I have all users and I just check those I want to tie to this quote, however there''s one more attribu...
2006 Apr 18
9
SQL Syntax Errors
...s through gem. I have a recurring problem where I get an SQL syntax error: Mysql::Error: #42000You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '''' at line 1: INSERT INTO quote_items (`name`, `quote_id`, `body`) VALUES(#<Quote:0x248a32c>, #<Quote:0x2485aac>, #<Quote:0x247ff30>) I''ve tried this with both MySQL and SQLite and I get a similar error in both. I''ve tried recreating the project by retracing my steps, as well as reinstalling Ruby on Rails in its e...
2006 May 08
4
set forign key
hi, got a small problem below and not to sure how to overcome this using rails two tables involved with this projects and quotes each project has a field quote_id as a forign field. When a user is ready to upload a quote they are linked to quotes/new from the show project page. Once the quote is uploaded how can I then set the quote_id field with the correct key? -- Posted via http://www.ruby-forum.com/.
2006 May 09
7
going crazy!!!!!! ActiveRecord::StatementInvalid in Project
...ctiveRecord::StatementInvalid in ProjectsController#create Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' , , , , )'' at line 1: INSERT INTO projects (`name`, `date_created`, `quote_id`, `client_id`, `description`, `user_id`) VALUES(, , , , , ) all seem sto go wrong when I call if @project.save however when I change belongs_to :quote to belongs_to :quotes (extra s on the end) Everything seems to work here as expected. any suggestions why thi sis happening? -- Posted via...
2010 Mar 31
1
[PATCH] Upgrading the server to work with Rails 2.3.4.
...e_format = true # Don't escape HTML entities in JSON, leave that for the #json_escape helper. # if you're including raw json in an HTML page. -ActiveSupport.escape_html_entities_in_json = false \ No newline at end of file +ActiveSupport.escape_html_entities_in_json = false + +def PGconn.quote_ident(name) + %("#{name}") +end -- 1.6.6.1
2007 Jul 24
11
Mock or Stub strategy for validates_uniqueness_of
Hi, I''m a bit stuck with mocking a unit test of a join model with regards to a validates_uniqueness_of clause. I have class Book < AR:B has_many :clippings various validates_presence_of etc end class Clip < AR:B has_many :clippings various validates_presence_of etc end class Clipping < AR:B belongs_to :book belongs_to :clip validates_uniqueness_of :clip_id,
2010 Jan 19
1
How I installed ovirt on fc 12
...config/environment.rb Line 23 RAILS_GEM_VERSION = '2.3.4' unless defined? RAILS_GEM_VERSION 5. Patch ruby initializers http://webtips-seja.blogspot.com/2009/10/undefined-method-quoteident-for.html vim /usr/share/ovirt-server/config/initializers/new_rails_defaults.rb Add : def PGconn.quote_ident(name) %("#{name}") end 6. Adapt ruby gems You must have : *** LOCAL GEMS *** actionmailer (2.3.4) actionpack (2.3.4) activeldap (1.2.0) activerecord (2.3.4) activeresource (2.3.4) activesupport (2.3.4) cgi_multipart_eof_fix (2.5.0) cobbler (1.6.1) columnize (0.3...
2006 Aug 12
0
insert into database failing
...s for requesting a quote. We will be in contact with you shortly'') else redirect_to :action => ''details'' end end it fails with the following (note the values to be inserted are actually objects that have not been dereferenced: INSERT INTO line_items (`order_id`, `quote_id`, `updated_at`, `created_by`, `product_id`, `quantity`, `type`, `updated_by`, `unit_price`, `created_at`) VALUES(#<Quote:0xa75703d0>, #<Quote:0xa75738a0>, #<Quote:0xa75749a8>, #<Quote:0xa756b268>, #<Quote:0xa7561218>, #<Quote:0xa75632fc>, #<Quote:0xa7567b18&gt...
2006 Jul 20
1
Having issues saving line items to the DB
...LE DB Provider for SQL Server The name "#" is not permitted in this context. Valid expressions are constants, constant expressions, and (in some contexts) variables. Column names are not permitted. HRESULT error code:0x80020009 Exception occurred.: INSERT INTO line_items ([cost_total], [quote_id], [text_pounds_order], [freight_weight], [quantity_id], [cost_overs], [text_pounds_overs], [cost_each], [cost_freight]) VALUES(#<Quote:0x355e998>, #<Quote:0x3552e18>, #<Quote:0x355b7a0>, #<Quote:0x354ce30>, #<Quote:0x3549c38>, #<Quote:0x3546a58>, #<Quote:0x354...
2006 May 03
4
default values
Hello, I''m working with a postgresql table CREATE TABLE elements ( id serial primary key, c1 text default f1(), ... cN text default fN() ); But if I use de lines @element = Element.new @element.save the values that element take are the nextval in the id field and nules in all the other fields. How can I get the defaults? (but without rewriting the
2006 Jul 09
17
Has many / belongs to error with mysql
Hi, I''ve got stuck with a problem on my rails app - I''ve created a database for quotes and bookings, with a futher table "eventdetails" (details of a quote or booking) linked one-one for both tables using a polymorphic assciation. This all works, but I am now trying to link a quote to a number of bookings with a has_many and belongs_to (the foreign key is in the
2007 Oct 15
6
SQL injection with :order, :limit, :group
I know how to avoid SQL injection attacks when you use :conditions User.find :first, :conditions => ["login=?", params[:username]] but how about with :order, :limit or :group? # uh-oh...spaghetti-oh User.find :first, :order => "login; delete from users; select * from users" Pat --~--~---------~--~----~------------~-------~--~----~ You received this message because you
2006 May 11
12
Verifying Good Setup of RoR + PostgreSQL
I''ve been reading the RoR tutorials and wiki help stuff, but I''m stuck. :( I''ve got RoR installed properly and get the "Welcome aboard! You''re riding the rails." I have an "article" controller, "article" model, and both an "article" and "articles" views (one is a remnant, I think, and no longer needed) (the