search for: jackc

Displaying 20 results from an estimated 36 matches for "jackc".

Did you mean: jack
2006 Aug 10
4
Speeding up ActiveRecord creation?
My completely empty model (no validation callbacks etc etc) takes an average of 0.05 seconds to create, at least according to Benchmark.realtime{200.times{Message.create(:from => "me@here.com", :message_type => ''email'', :subject => "hello", :body => "goodbye", :sent_at => Time.now)}}/200 That''s a little slower than
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 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 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 Jul 17
1
How to DRY up validates_presence_of
...# without this check an exception will be thrown on access to the nil attribute return if start_date.nil? || end_date.nil? if end_date < start_date errors.add_to_base ''End date cannot be earlier than start date.'' end end Thanks. -- Jack Christensen jackc@hylesanderson.edu
2006 Apr 29
1
Warnings printed to console causes error if console closed on Linux
...trying to print the warning to the console. If I kept the terminal open that I started the server on it would print the warning, but not crash. I''m using lighttpd and scgi. I start the server by using scgi_cluster via SSH. Any ideas why this is happening? Thanks! -- Jack Christensen jackc@hylesanderson.edu
2006 Apr 20
3
has_many :through with has_many/has_many join models
...) The where clause is invalid. It is using: semesters.semester_id = #{student_semester_record.id} It should be using: semesters.id = #{student_semester_record.semester_id} Am I doing something wrong, is this a bug, or is this association type simply not supported? Thanks! -- Jack Christensen jackc@hylesanderson.edu
2006 Feb 16
5
Firefox and IE performance with Rails App
...it works fine. The slow pages were typically posting a form with a couple hundred fields. This behavior was the same with the rails server running on Windows, Ruby 1.8.2, Apache2, FastCGI and also on Linux, Ruby 1.8.4, Lighttpd, FastCGI. Any ideas what would cause this? -- Jack Christensen jackc@hylesanderson.com
2006 Apr 20
1
has_many.count not accepting options hash
...:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_recor d/associations/has_many_association.rb:47:in `count'' from (irb):21 It appears to call to_s on whatever is passed to it. Is this a bug, normal behavior, or am I doing something wrong? Thanks. -- Jack Christensen jackc@hylesanderson.edu
2007 Nov 15
4
Using .find_by_sql for database/admin queries
I want to create an internal admin view to display the output of "show variables" from mysql. What''s the best approach do this? For example, I''m doing something like this: @variables = ActiveRecord::Base.find_by_sql "show variables;" Then, I get stuff like this back (227 elements in @variables) in script/console: >> @variables[0] =>
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 Aug 10
1
Customizing log output
I''d like to include the user name along with/instead of the session id in my log files. Is there a place to customize the log format, or do I just need to through the logger object and manually write it in a before_filter on my ApplicationController? Thanks. -- Jack Christensen jackc@hylesanderson.edu
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 Mar 10
0
Data modeling - representing data across models
...num_hours_scheduled_by_department_and_week( department, week ) seems rather messy. The last doesn''t seem to fit in any existing model. I guess the question boils down to where do you represent data that is the intersection or composite of multiple models? Thanks. -- Jack Christensen jackc@hylesanderson.edu
2005 Dec 15
3
define_method with parameters
Hi, I''m trying to write a macro which defines methods. One of these should have a parameter, but I can''t get that to work. Something like: define_method("printstuff") do puts "blabla" end works fine. But, how do I use define_method to create something like: def printstuff(the_stuff) puts the_stuff end Thanks in advance.
2005 Dec 29
0
observe_form without an update parameter
...he couple second hang is done. If a add an update, it goes fast and returns status 200. It seems it shouldn''t be necesary to have an update and an empty div for a action that always calls render :nothing => true Is this a bug or am I missing something? Thanks. -- Jack Christensen jackc-/SOt/BrQZzOj3I+7jmQ39gC/G2K4zDHf@public.gmane.org
2012 Mar 03
0
Wine1.4-rc5 breaks (jack)audio setup
...me:ntdll:NtLockFile I/O completion on lock not implemented yet jack_client_new: deprecated jack_client_new: deprecated jack_client_new: deprecated jack_client_new: deprecated jack_client_new: deprecated Cannot read socket fd = 22 err = Success JackSocketClientChannel read fail Cannot open alsa-jack.jackC.28792.4 client jack_client_new: deprecated Cannot read socket fd = 14 err = Connection reset by peer Cannot read socket fd = 14 err = Connection reset by peer Could not read result type = 22 Client name = alsa-jack.jackP.28792.5 conflits with another running client Cannot connect to the server Cann...
2005 Jul 28
0
ActiveRecord, computed values, and associations
...hing like being able to sort or filter based on the number of a has_many association or sum or average some field of the has_many. So first, is there something I can do better now -- and two, can we get some more support built into ActiveRecord for this type stuff? Thanks. -- Jack Christensen jackc-/SOt/BrQZzOj3I+7jmQ39gC/G2K4zDHf@public.gmane.org
2009 Sep 28
3
rjb: Java classes in Rails
Hi, For those who might not be aware, rjb is a killer gem for using java classes inside your rails app (or any ruby code). Check it out at: http://rubyforge.org/projects/rjb/ I was able to successfully use it in one of my apps that required some code that is only available in java. And it''s much nicer than having to compile a java app, then shell out using backticks, get back the return