similar to: How to find rows where no row in associated table exists?

Displaying 20 results from an estimated 300 matches similar to: "How to find rows where no row in associated table exists?"

2007 Feb 26
24
Ruby/rails port of Cocoon/hibernate
Hi, I''m currently running an apache/jboss cocoon/flow/hibernate/ajax paypal (directpayment) project and am looking into the possibility of porting it across to ruby/rails. For that reason I would like to know the following: 1. Can I call my java classes or would I be looking at a complete rewrite in ruby? 2. How effective is ruby in terms of seperation of concerns regarding design from
2007 Mar 13
6
comparing two databases with Active Record.
I have two databases in SQLite with the same schema. The other database was populated by an external customer and then returned. I want to use ActiveRecord to do the comparison. I am not sure of the best way to access the tables in each database with ActiveRecord models. I could change the connection dynamically whenever I want to switch between the databases, but this would seem to be clumsy
2006 Oct 10
1
DEFCON errors
err:module:import_dll Library GLU32.dll (which is needed by L"C:\\Program Files\\Defcon\\defcon.exe") not found err:module:import_dll Library OPENGL32.dll (which is needed by L"C:\\Program Files\\Defcon\\defcon.exe") not found err:module:LdrInitializeThunk Main exe initialization for L"C:\\Program Files\\Defcon\\defcon.exe" failed, status c0000135 I keep getting the
2007 Nov 06
1
gem freezes
Might be more of a general Ruby question I suppose, but you guys will know anyhow ... After an upgrade to Leopard (a clean install, not a literal upgrade) I''ve copied my projects back onto my Mac, but I get an error when trying to start Mongrel that according to sources on the internet indicate that I''m missing some gems. When I try and install them however, the gem command
2013 Mar 12
2
Only running database_grant the first time.
I''m using puppet through Vagrant to manage my dev VM, and as part of that I have a few database grants that I run after creating users, but when I subsequently run vagrant up or provision these grants fail (because of some changes I make to the mysql config after they have been created.) I''m using database_grant to execute the grants, but there doesn''t seem to be a
2007 Mar 25
3
Session is nil inside model
I''m tring to write a little function to indicate if a user is able to pay an invoice, I have my invoice model with: def canPay? if session[:user].id == self.consumer_id return true; else return false; end end as a method, but it gives the error: "undefined local variable or method `session'' for #<Invoice: 0xb7670928>" Right before
2004 Jun 14
15
oh323
This module wont compile can anyone give me any assistance -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20040614/03ae433c/attachment.htm
2008 Feb 07
1
ActiveRecord 'find_or_initialize_by' dynamic finder bug? Ignoring conditions.
Hello all, I just ran into something that I think is a bug, and I would like to confirm with the core team whether this is expected/desired behavior or if this is a bug that I should file and develop failing tests for (I doubt I have the active record method_missing fu to actually patch it). Test Scenario: I would like to find or initialize a new user and base the find on the users email
2007 Mar 15
7
SEC to minutes
Hi Friends, I am new to ruby on rails. I want to convert seconds to minutes. like if 220sec= 3.40 minutes I did in this way sec/60 but it giving the false results ex : 70 sec = 110/6=1.8 but it is worong as for time Can u give any advice? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed
2006 Jan 09
6
Nil column results, possible to ignore?
For a table "clients" there are city, state, and zip fields. However, for some clients we only have a state with no actual address. The following code throws a "You have a nil object" error when outputting my client list. Is there a way around this, short of writing a specific case for each possibility? &lt;%= client.city + '', '' + client.state +
2006 Sep 15
1
Applying game patches.
Hi all, I've downloaded and installed Wine specifically to play Warhammer 40k, Dawn of War. I checked out the app database first and the signs were good, my version of Linux (Debian Sarge) was reported as working (although the installer had been tested) I ran the installer, and it appeared to work fine (although it only asked for the 1st disk) but when I try and run it, it asks for the
2003 Feb 28
2
Help on rpart
To whom it may concern, I am using the rpart() function to perform a recursive tree analysis on a set of data that includes both numerical and categorical attributes. At the end of the analysis, I would like to see the linear model at each node in the tree. In particular, I would like to see each node specific model coefficients associated with each of the independent variables and intercepts.
2008 Mar 04
2
Why would ActiveRecord connect to Postgres as root?
My databases.yml makes no mention of root and in my dev environment everything works fine, however following a deployment with Capistrano about an hour ago, I get the following error: PGError in HomeController#index FATAL: role "root" does not exist /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ connection_adapters/postgresql_adapter.rb:713:in `connect''
2006 Jun 07
3
Including scriptaculous.js causes page to "hang"
When I say hang, I mean the browsers spinner keeps spinning and Firefox''s info bar at the bottom says "Transfering data from ...... " I''m just including the js like this: <script src="/js/prototype.js" type="text/javascript"></script> <script src="/js/scriptaculous.js" type="text/javascript"></script>
2007 Aug 15
2
has_many :through ... What am I missing?
class Ladder < ActiveRecord::Base has_many :players has_many :users, :through => :players end class Player < ActiveRecord::Base belongs_to :users belongs_to :ladders end class User < ActiveRecord::Base has_many :players has_many :ladders, :through => :players end When I try the following code (on the console) I get an error: @ladder = Ladder.find(1) @ladder.users I
2020 Sep 22
2
Unifying CMake variable names used in checks across subprojects
We've been using the runtimes build for a while now and we're very happy with it. However, with an increasing number of targets, it can be fairly slow and I have noticed that we now spend more time in CMake than in Ninja. There are various ways we could improve things like eliminating unnecessary checks. When running checks like check_c_compiler_flag, check_cxx_compiler_flag or
2006 Nov 07
2
undefined local variable or method `invoices' for Provider:Class
I''m pretty new to Rails, and I think my app has progressed quicker than my knowledge of Rails/Ruby has ... I have the following models: [ -- Begin -- ] class Provider < ActiveRecord::Base has_many :invoices has_one :user def self.get_invoices invoices.find(:all) end end class User < ActiveRecord::Base belongs_to :Provider belongs_to :Consumer def
2006 Jul 25
2
join in legacy DB?
I''ve got a problem with some tables that don''t follow any RAILS standards. how do I define the join in the model when all three tables have wacky names? class Machine < ActiveRecord::Base set_table_name "tbl_CodeMgmt_Host" set_primary_key "Id" end class Pool < ActiveRecord::Base set_table_name "tbl_CodeMgmt_Pool" set_primary_key
2003 Feb 18
7
gnophone
I am having a really hard time getting gnophone working with asterisk. Gnophone tries to register with my server but there is no response. I can direct incoming calls to gnophone but if gnophone answers them, asterisk does not recognize it. Here is my configuration: iax.conf [jambo] type=user host=dynamic defaultip=136.159.99.100 permit=136.159.99.100 username=jambo secret=fubar
2007 Jul 04
3
Testing Rails Associations
Hi, I''m very new to rspec, so if this is not the right forum please let me know. I''m starting to spec my models first in an existing rails app, porting from a mix of Test::Unit, and simply_bdd amongst others. I''m at the point where I want to test that certain associations are present. What I''m not sure of is should I test the association or the method and