Displaying 16 results from an estimated 16 matches for "quote_ident".
2006 Apr 20
5
strange mysql problem
i have this model:
class LineItem < ActiveRecord::Base
belongs_to :quote
end
in 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`,
2006 Jan 30
0
Adding ActiveRecord objects to the session
Hi all,
I am creating an AJAX quoting/puchasing system and I am having a bit 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
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
2006 Apr 18
9
SQL Syntax Errors
Hi,
I''m running Rails on Mac OS X 10.4. I''ve installed ruby/gem from
darwinports, and then rails 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
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
2006 May 09
7
going crazy!!!!!! ActiveRecord::StatementInvalid in Project
any suggestions on why I am gaining this error.
ActiveRecord::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`)
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.1)...
2006 Aug 12
0
insert into database failing
hi all,
i am trying a little project based on the agile book''s shopping cart
example and have hit a problem. the inserts are failing when saving a
quote which contains line_items. the models are as follows
(quote_line_item is using single table inheritance):
class Quote < ActiveRecord::Base
has_many :quote_line_items
end
class LineItem < ActiveRecord::Base
end
class
2006 Jul 20
1
Having issues saving line items to the DB
Hello everyone, I''m fairly new to Rails (writing my first real app) and
brand new to this mailing list.
I''ve got a rails/sql error I just can''t seem to solve. It''s probably
really simple, but I''m been googling and reading for a day and have made
zero progress on it. Hopefully someone on this list can shine some light
on my problem, or point me in the
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