similar to: Speeding up ActiveRecord creation?

Displaying 20 results from an estimated 1000 matches similar to: "Speeding up ActiveRecord creation?"

2006 Jul 14
18
ActiveRecord Love While We''re At It
I am working on and will be publicly showing ActiveRecord some love around the time of the RubyConf*MI [1] in late August. My main focus is getting AR to better handle inserts, updates and merges when working large sets of data. It can improve improve performance by 400% to 600% in preliminary benchmarks. I am coding this in a way so it can be patched to AR easily, and with that in mind
2006 Aug 11
4
1337 Speak For Ruby and an ActiveRecord 1337 Speak Extension - 0.0.1
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 ActiveRecord Extension 1337 - 0.0.1 is released! A 1337 speak module for ruby is released! It is bundled with the ActiveRecord extension activerecord_1337. This allows you to encode your application in l33t speak. You can use the L337 module standalone or use it bundled with the ActiveRecord extension. This plugin can be easily used as a Rails
2006 Feb 21
8
pdf generators
Hi Folks, Could you please comment on various PDF generators that one may use. Thanks. Lalit Send instant messages to your online friends http://au.messenger.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060221/8b319788/attachment.html
2006 Feb 03
6
Go back to previous action
Hello all! I have two views (list_1 and list_2) that show a list of users in two different ways. In the views for these actions there is a link to edit a specific user properties (edit_user). That works fine, except that when I change the user I want to go back to the view that originated the request and not to the default list (list_1). Can anyone help me? Best regards, Hugo -- Posted via
2006 Jun 16
3
ActiveRecord, using sql functions for some attributes
Hi. I need to use functions INET_ATON, INET_NTOA for IP address retrieving. Is it possible to make this transparently (without custom SQL for saving, updating and retrieving)?
2006 May 23
8
ad-hoc query
How do you run an ad-hoc query that does not belong in any model? I thought it was something like ActiveRecord::connection.find("my query..."), but I can''t seem to find the documentation on it. I know I''ve seen it somewhere before, though. thanks, Jeff -- Posted via http://www.ruby-forum.com/.
2006 Feb 16
5
Firefox and IE performance with Rails App
In my rails application, certain computers were having huge problems. There were certain pages that were exceptionally slow, even to the point of timing out. Other computers did not have a problem. I finally found that Firefox was the difference. When using Firefox on those computers it works fine. The slow pages were typically posting a form with a couple hundred fields. This behavior was
2006 Jul 17
1
How to DRY up validates_presence_of
Given the case of validating the presence of an attribute and then performing other tests on said attribute, how do you go about not having to check for nil in the other tests? Example: validates_presence_of :start_date, :end_date validate :validate_start_date_before_end_date def validate_start_date_before_end_date # without this check an exception will be thrown on access to the
2006 Apr 29
1
Warnings printed to console causes error if console closed on Linux
I had a statement that was generating a warning about parenthesise argument for future version. The interesting thing was it would crash the page with an input/output error on my production linux server, but worked fine in webbrick/windows. I finally tracked it down to it crashed when trying to print the warning to the console. If I kept the terminal open that I started the server on it would
2006 Aug 19
3
Activerecord validation problems
Hi everyone, I''m having trouble validating a model. The corresponding table has some boolean columns: create_table :permissions do |t| t.column :project_id, :integer, :null => false t.column :group_id, :integer, :null => false t.column :read, :boolean, :null => false, :default => false t.column :write, :boolean, :null => false, :default =>
2006 Apr 20
1
has_many.count not accepting options hash
has_many.count does not seem to support an options hash like ActiveRecord::Base.count does. Example: >> AcademicProgram.find(:first).course_requirements.count :conditions => "courses.name LIKE ''a%''", :include => :course => 40 >> ap.ap_requirements.count :conditions => "courses.name LIKE ''a%''", :include =>
2006 Jul 11
2
Samba PDC With LDAP Backend, Failed to initialise SAM_ACCOUNT for user
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I have seen this problem posted several times and the common answer doesn't seem to be doing it for me. Here's the error: Trying to load: ldapsam_compat:ldap://127.0.0.1/ Attempting to register passdb backend ldapsam Successfully added passdb backend 'ldapsam' Attempting to register passdb backend ldapsam_compat Successfully added
2006 Jul 28
1
Nasty pitfall: don''t use ^ and $ in validation regexes!
Let''s say you want to validate that an attribute contains only 2-10 lowercase characters, e.g. with validates_format_of. The appropriate regex is obviously /^[a-z]{2,10}$/, right? Wrong! Try it with "abc\nANYTHING YOU LIKE" - this is perfectly valid. On the second look the reason is clear: ^ matches the start of a line, $ matches the end of a line. So as long as one line in
2006 May 09
2
Bulk Inserts. Fast way to insert 1000s records?
Hi, This code loops through my results and saves them : @results.each{|r| r.save} There are potentially thousands of results. This takes ages to complete. Is there a quicker way to do this? Any help is greately appreciated Thanks Chris -- Posted via http://www.ruby-forum.com/.
2006 Jul 14
1
ActiveRecord, can it save more than one row at a time????
Hi, I wonder if there is some fonctions which allow an activeRecord to save more than one row at a time??? As I understand, when we create an object from AC::Base, it represents one row of the table. So if I want to save more than one row, I have to create the object one by one and then save them one by one. If I have 10, it is fine, but if I have more than 1000, so it will a lot of time.... So
2007 Jun 05
4
uninitialized constant RailsHandler::Dispatcher
Hello, I am running in to an error trying to run mongrel. The server starts but then trying to access any url in my application throws this error: calling Dispatcher.dispatch uninitialized constant RailsHandler::Dispatcher ./script/../config/../vendor/rails/activesupport/lib/active_support/dependencies.rb:477:in `const_missing''
2006 Nov 24
7
Anyone know whats going on with PostgreSQL async_exec errors?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Anyone know what''s going on with ActiveRecord Edge and 1.2RC1 unit tests. I get 13 failures from the "async_exec" method call. ie: test_callback_rollback_in_save(ConcurrentTransactionTest): ActiveRecord::StatementInvalid: NoMethodError: undefined method `async_exec'' for #<PGconn:0xb75a8754>: SET
2006 Jun 05
5
Controller-wide instance variable
Is it possible to declare an instance variable in a controller that is available to every action without defining the variable in every action? -- Posted via http://www.ruby-forum.com/.
2006 Jul 06
6
Class variables in templates/layouts
I''m having problems with class variables.. I have a class: class Content::ApplicantsController < ApplicationController layout "mylayout" @@tab = "mystring" [... the rest is standard scaffold-created stuff ...] and a layout (mylayout.rhtml): [...] <title><%= @@tab.capitalize %></title> [...] And I keep getting this error: uninitialized
2006 Aug 01
2
HOWTO? security based on data values
Hi! I recently started with RoR and this may be a newbie question. I have a company table, employee table and transactions table. 1 company has many employees. Each employee performs many transactions. Employees from different companies LOGIN to the system to record their transactions. Employees can search on all transactions associated to their companies (indirect relationship via employee),