similar to: :through and STI

Displaying 20 results from an estimated 2000 matches similar to: ":through and STI"

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
2006 May 20
1
acts_as_paranoid overrides ActiveRecord::Base??
Guys, I am trying to figure out what exactly does this line do at the end of "acts_as_paranoid" plugin? ActiveRecord::Base.send :include, Caboose::Acts::Paranoid::ActiveRecord My problem: I have some classes that I use acts_as_paranoid, and others with tagging support. Classes declared as taggable, throw error, which appears to be in the acts_as_paranoid version of the
2006 Apr 06
4
Record retrieval in Many-to-many using :through not working
Hello, I get an error while retrieving records from the following model structure. Tables foods - id, food foodallergies - food_id, symptom_id, a few other columns symptoms - id, symptom Models class Food < ActiveRecord::Base has_many :foodallergies has_many :symptoms, :through => :foodallergies end class Symptom < ActiveRecord::Base has_many :foodallergies has_many :foods,
2006 Feb 09
2
breakpointer error
Hi, I can''t get breakpointer to work on locomotive. Pretty sure it used to work... Any ideas?? Jeroen jeroen$ ruby script/breakpointer /Applications/Locomotive/Bundles/rails-1.0.0-max.bundle/Contents/Resources/ports/lib/ruby/1.8/drb/drb.rb:828:in `getaddrinfo'': getaddrinfo: No address associated with nodename (SocketError) from
2006 Dec 22
2
Relating Namespaced Models
I am dealing with a large project. I use a lot of STI and therfore have a lot of models. I''d like to use namespaces to help organize my models but am having trouble getting started. I have a base model Term::Base located in /app/models/term/base.rb: class Term::Base < ActiveRecord::Base set_table_name "terms" end I have a non-namespaced client model: class Client <
2007 Mar 22
2
Enumerable sum oddity
Hi. In this setup "account has_many :consultations". Can anyone explain the following behaviour to me? Rails 1.2.2. The "sum" method should return 0 for an empty array. >> a = Account.find(1) => #<Account:0x39c80a8 @attributes={...} >> a.consultations => [] >> a.consultations.sum(&:foo) ArgumentError: wrong number of arguments (1 for 2)
2011 Aug 31
2
stumped on how to reorder factors
I am trying to reorder a factor data type so that when I plot stats associated with the factor, the ordering makes sense. For instance, if I have a factor entered as follows ... A = as.factor(c("1", "10", "3", "3", "10", "10")) levels(A) ... the ordering does not really make sense (assuming I want the factor ordered by integer
2008 Jul 08
0
Bug with serialized columns in console ?
Hi, I recently added 2 serialized columns in my class Server : class Server < ActiveRecord::Base serialize :visa, Hash serialize :appli, Array ... No problem in my controller and my application and everything works as expected : Excel exports following the "visa" Hash or "appli" Array are ok. But since I added the visa Hash, I can''t load the record with
2012 Feb 29
1
equivalent from gladder and ladder from stata
Dear community, Apologies, I'm still pretty newbie. Anyway, I am performing linar regression analysis. As a common cause of non-normally distributed residuals is non-normally predictor variables, i'm interested in achieving the best transformation of the predictors. I've seen some commands at R, but I would like to know if it exists a command equivalent to gladder (graphic display)
2008 Jan 16
0
[CruiseControl] RubyOnRails build 8649 failed
The build failed. CHANGES ------- Revision 8649 committed by gbuesing on 2008-01-16 20:07:10 Introducing DateTime #utc, #utc? and #utc_offset, for duck-typing compatibility with Time. Closes #10002 M /trunk/activesupport/CHANGELOG M /trunk/activesupport/lib/active_support/core_ext/date_time/calculations.rb M /trunk/activesupport/test/core_ext/date_time_ext_test.rb TEST FAILURES AND
2005 Dec 15
1
Problem with ActionMailer -- which looks really cool!
Whatever I do to try to connect including trying different ISPs, I get the same errors, here they are: Errno::ECONNREFUSED in Events#send_my_email Connection refused - connect(2) Application Trace | Framework Trace | Full Trace /Applications/Locomotive/Bundles/rails-0.14.1-min.bundle/Contents/ Resources/ports/lib/ruby/1.8/net/protocol.rb:83:in `initialize''
2005 Dec 30
2
Locomotive 1.0.0 for Mac OS 10.3+
Hi All, I''m very happy to announce the release of Locomotive 1.0.0. Locomotive is a one-click development solution for Rails on Mac OS X. See more details at http://locomotive.sourceforge.net Get it at: http://prdownloads.sourceforge.net/locomotive/Locomotive_1.0.0.dmg?download What''s New? =========== * Server bundle updated to lighttpd 1.4.8 * Server bundle updated to
2006 Feb 17
3
Migration Errors?
Hi there, I just bought the Rails Recipes and PDF preview of the book. So far it''s excellent. I decided to try Chapter 8 of the book regarding tagging. I''ve done migrations before, and I feel comfortable with them, however this error stumps me. -------------------------------------------------- antrover:~/RubyProjects/rlog dhoefler$ ruby script/generate migration
2005 Dec 15
1
Locomotive for Mac OS X 10.3+. Now with Rails 1.0
Hi All, The base Locomotive download now comes with Rails 1.0. http://locomotive.sourceforge.net If you already have a current version of Locomotive (0.4.1), all you need is a new bundle. Rails 1.0 Min: http://prdownloads.sourceforge.net/locomotive/Rails_1.0.0_Min.dmg?download Rails 1.0 Max: http://prdownloads.sourceforge.net/locomotive/Rails_1.0.0_Max.dmg?download Cheers! -r -- Ryan
2011 May 07
4
Activerecord::JDBCError: Invalid column number
Hi, I''m rather new to Ruby and RoR, so I do not really know whether this ist the right forum to place my question. For my first ''project'' I planned to create a simple online-viewer, which grabs data from an existing database and make them visible in a structured form via browsers. So I thought that could be the right beginner-project, because I have only read datasets
2005 Dec 31
6
What does this error mean when using scaffold?
Last login: Fri Dec 30 15:34:43 on ttyp1 source /private/var/tmp/folders.501/TemporaryItems/Locomotive. 1135999534.992790-16807 Welcome to Darwin! frank-roccos-powerbook58:~ farocco$ source /private/var/tmp/folders. 501/TemporaryItems/Locomotive.1135999534.992790-16807 frank-roccos-powerbook58:~/Documents/receipts farocco$ script/ generate scaffold receipt receipt
2007 Jan 22
0
Recursive-SVM (R-SVM)
I am trying to implement a simple r-svm example using the iris data (only two of the classes are taken and data is within the code). I am running into some errors. I am not an expert on svm's. If any one has used it, I would appreciate their help. I am appending the code below. Thanks../Murli ####################################################### ### R-code for R-SVM ### use leave-one-out
2006 Jan 18
15
Anyone got Globalize working???
Hi all In another thread I complain about an error I get after trying to get Globalize working. http://www.ruby-forum.com/topic/51988#new Now I want to ask you, if anybody of you has ever got Globalize working? I have done exactly what''s written in the (absolutely much too short) tutorial of its wiki... http://globalize.diluvia.net/wiki ...and I''m very frustrated that no
2005 Sep 27
6
Locomotive 0.2.4 for Mac OS X 10.3+
I am pleased to announce the newest release of Locomotive! http://locomotive.sourceforge.net Mostly a bug fix release. If you are using Locomotive on 10.4 you should definitely upgrade. New in 0.2.4 ============ * Rename application entries in status window * Run/Restart/Stop buttons now immediately update * Bundle choosing is fixed for Mac OS X 10.4 * Missing gem dependencies in Rails 0.13.1
2005 Sep 22
0
Locomotive 0.2.1 for Mac OS X 10.3+ : rails_product support
I am pleased to announce the newest release of Locomotive with one new feature! New in 0.2.1 ============ * Correctly loads rails_product''s from the sites/ directory Otherwise unchanged from 0.2.0. If you already have 0.2.0 and don''t want/need rails_product support, then you don''t need to download this release - rails_product support is the only change. Get it at: