search for: attributes_with_quot

Displaying 20 results from an estimated 20 matches for "attributes_with_quot".

Did you mean: attributes_with_quotes
2006 Mar 29
2
AR 1.14 oracle_adater.rb does not work
the error is : wrong number of arguments (1 for 0) where : active_record/connection_adapters/oracle_adapter.rb:53:in `attributes_with_quotes_pre_oracle'' this method is new, it was an alias in the previous version : alias :attributes_with_quotes_pre_oci :attributes_with_quotes #:nodoc: I replaced the method by the alias of the previous version, and it is working fine. This is the code (s/oci/oracle/) : alias :...
2006 Mar 28
4
Problem with ActiveRecord, create, save, and Oracle adapter?
...''new'' 163: end Here''s the error (which is the same as what''s in the dev log): ArgumentError in Schedules#create wrong number of arguments (1 for 0) /opt/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/connection_adapters/oracle_adapter.rb:53:in `attributes_with_quotes_pre_oracle'' /opt/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/connection_adapters/oracle_adapter.rb:53:in `attributes_with_quotes'' /opt/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/base.rb:2031:in `quoted_column_names'' /opt/lib/ruby/gem...
2008 Dec 20
9
Upgrade to Rails 2 - problem with "save" (MySQL boolean issue?)
I have been working through an upgrade of my 1.2.6 application to 2.2.2. I am almost there but I have hit a problem with ActiveRecord. Before the upgrade, the following code was working fine. def create_root(administrator) root = create_root_collection(self.pingee_name, administrator,
2006 Feb 28
0
ActiveRecord: Legacy primary keys
...d EOS end def self.content_columns @content_columns = columns.reject { |c| c.name =~ /(_id|_count)$/ || c.name == inheritance_column } end def update if !@new_id sql = "UPDATE #{self.class.table_name} " + "SET #{quoted_comma_pair_list(connection, attributes_with_quotes(false))} " + "WHERE #{self.class.primary_key} = #{quote(id)}" else sql = "UPDATE #{self.class.table_name} " + "SET #{quoted_comma_pair_list(connection, attributes_with_quotes(false))} " + ", #{self.class.primary_key} = #{q...
2008 Jul 27
0
dhtml_calendar Plugin and dates
...vendor/plugins/dhtml_calendar/lib/extensions/active_record.rb:62:in `quote'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/mysql_adapter.rb:221:in `quote'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:2576:in `attributes_with_quotes'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:2574:in `each'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:2574:in `attributes_with_quotes'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/b...
2005 Dec 16
0
ArgumentError on create
...number of arguments (2 for 0) RAILS_ROOT: /var/www/learningq/public/../config/.. Application Trace | Framework Trace | Full Trace #{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/base.rb:1628:in `quote'' #{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/base.rb:1628:in `attributes_with_quotes'' #{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/base.rb:1749:in `inject'' #{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/base.rb:1626:in `attributes_with_quotes'' #{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/base.rb:1718:in `quoted_co...
2008 Oct 21
6
detecting width overflow in serialized column with mysql
So I''ve got an ActiveRecord model pointing to a MySQL db, with an auto-serialized column ("serialize :columnName"). Thing is, MySQL, depending on how it''s configured (like, by default), has a bad habit of just truncating your data if it''s too wide for the column, with no error raised. Yeah, I can probably reconfigure MySQL and/or my AR connection to it. But
2006 Apr 04
6
Oracle Problem. Maybe driver
...updating/inserting something into the DB. This is the error message : wrong number of arguments (1 for 0) RAILS_ROOT: config/.. Application Trace | Framework Trace | Full Trace /opt/tools/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/connection_adapters/oracle_adapter.rb:53:in `attributes_with_quotes_pre_oracle'' /opt/tools/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/connection_adapters/oracle_adapter.rb:53:in `attributes_with_quotes'' /opt/tools/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/base.rb:1719:in `update_without_lock'' /opt/...
2006 Apr 17
5
Finding out updated fields
Hi, When we update a record via an update form, is there an easy way to find out the fields that have been changed. If the update is successful, i want to display: The following fields have been changed: field-name = new-value ... Thanks, Lantis. -- Posted via http://www.ruby-forum.com/.
2007 Oct 07
1
How to store a Mechanize object in the database?
...uby/1.8/yaml/rubytypes.rb:18:in `add'' from /usr/lib/ruby/1.8/yaml/rubytypes.rb:18:in `to_yaml'' from /usr/lib/ruby/1.8/yaml/rubytypes.rb:17:in `each'' ... 14 levels... from /var/lib/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:2029:in `attributes_with_quotes'' from /var/lib/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:2128:in `quoted_column_names'' from /var/lib/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1813:in `create_without_callbacks'' from /var/lib/gems/1.8/gems/acti...
2006 Mar 28
1
Rails 1.1 RC1 Troubles
Just updated my Rails version with ''rake freeze_edge''. Now sadly, nothing works. The oracle connection adapter overrides the column name quoting in ActiveRecord::Base and breaks MySQL saving anything. Got around that commenting out the offending method. Next issue, generate a new scaffold of a simple table. Creating a new record fails because apparently Ruby is trying to
2005 Aug 02
0
Debugging woes
...ruby/gems/1.8/gems/activerecord-1.11.0/lib/active_record/base.rb:1419:in `clone_attributes'' from /usr/lib/ruby/gems/1.8/gems/activerecord-1.11.0/lib/active_record/base.rb:1071:in `attributes'' from /usr/lib/ruby/gems/1.8/gems/activerecord-1.11.0/lib/active_record/base.rb:1291:in `attributes_with_quotes'' from /usr/lib/ruby/gems/1.8/gems/activerecord-1.11.0/lib/active_record/base.rb:1140:in `update_without_lock'' from /usr/lib/ruby/gems/1.8/gems/activerecord-1.11.0/lib/active_record/locking.rb:45:in `update_without_callbacks'' from /usr/lib/ruby/gems/1.8/gems/activerec...
2006 Jul 18
1
Saving an ActiveRecord object
I get this error when I try to save an object that extends of ActiveRecord: NoMethodError in TeamController#add_player You have a nil object when you didn''t expect it! The error occured while evaluating nil.keys .... .... #{RAILS_ROOT}/app/models/player.rb:17:in `create_player'' #{RAILS_ROOT}/app/controllers/team_controller.rb:53:in `add_player'' And my Player model
2009 Mar 03
2
Passing an SQL fragment in AR save
I have a basic model class TestTime with no customization. class TestTime < ActiveRecord::Base end I would like to pass the following SQL fragment as part of an AR save call to TestTime objects. How and where would I do this in the model? "set c_time=current_time" (current_time is an SQL method, not a variable). -- Posted via http://www.ruby-forum.com/.
2009 Apr 01
1
Erro de update no rails 2.3.2
...stou usando o rails 2.3.2. Quando tento fazer qualquer update (método save em um registro existente), recebo o erro abaixo: ArgumentError in RequisicaosController#enviar_rede wrong number of arguments (3 for 1) c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/ base.rb:2875:in `attributes_with_quotes'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/ base.rb:2875:in `update_without_lock'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/ locking/optimistic.rb:81:in `update_without_dirty'' c:/ruby/lib/ruby/gems/1.8/gems/activerecor...
2006 Feb 27
4
2 belongs_to to the same parent table
Hello! I have 2 table: users and buddies User: id, name, ... Buddy: id, user_id, user_buddy_id, ... So if you have 2 users 1,jack and 2,fred and fred is a buddy of jack, there is a Buddy object: id=1, user_id=1, user_buddy_id=2 I can declare only one belongs_to in Buddy and one has_many in User. And there is conflict if I had the second one (the first one is discarded) class User has_many
2010 Apr 20
13
why is ActiveRecord tying to select nonex ID column?
I''ve loaded (and updated) thousands of these MeteredUsage records. In the middle of a run, I suddenly get: ActiveRecord::StatementInvalid: Mysql::Error: Unknown column ''id'' in ''where clause'': UPDATE `metered_usages` SET `cost` = 12603.46 WHERE `id` = NULL I can''t see anything that''s different about this particular record compared to
2007 May 31
0
Rails AR/SQLServer Unit Test: [6912] failed (but getting better)
...record/base.rb:2318:in `each'' ./test/../lib/active_record/base.rb:2318:in `inject'' ./test/../lib/active_record/base.rb:2318:in `clone_attributes'' ./test/../lib/active_record/base.rb:1822:in `attributes'' ./test/../lib/active_record/base.rb:2196:in `attributes_with_quotes'' ./test/../lib/active_record/base.rb:2295:in `quoted_column_names'' ./test/../lib/active_record/base.rb:1975:in `create_without_callbacks'' ./test/../lib/active_record/callbacks.rb:256:in `create_without_timestamps'' ./test/../lib/active_record/tim...
2009 Jan 11
6
Why does ActiveRecord allow perception of success when updating an ID, however it doesn't really work(i.e. no change in database)?
Hi, Why does ActiveRecord allow perception of success when updating an ID, however it doesn''t really work(i.e. no change in database)? Here''s an example. The update of "id" versus update of a non-existent attribute. ?> ai = AccountItem.find(:first) => #<AccountItem id: 1, account_id: 1, date: "2009-01-11", amount:
2007 Mar 01
9
Active Record proposal/discussion for improvement
Hello, I have started in "Ruby on Rails: Talk" a discussion about my problems with current ActiveRecord implementation. Please take a look here: http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/d40b754fc5872a99/47cff815df123b8a?lnk=gst&rnum=2 Regards Oliver Paulus --~--~---------~--~----~------------~-------~--~----~ You received this message because you are