search for: join_model

Displaying 5 results from an estimated 5 matches for "join_model".

Did you mean: join_models
2007 Jan 08
2
Two problems with Acts_as_paranoid
...l (and if yes, if they have any solutions). 1. When using has_many :through, AAP doesn''t seem to take into account the fact that your join model might also be paranoid. My solution to this at the moment is to add an explicit conditions clause to the has_many :through statement, i.e. "join_model.deleted_at IS NULL" - is there a better way of getting the same result? 2. My tests sometimes fail in a random fashion. Looking at the test.log, nothing is different between test invocations, so the only conclusion I can come to is that it has something to do with the timestamp comparison som...
2007 Mar 19
0
action_web_services error with rspec_on_rails
...h correspond to one rails controller. I can run them individually and they pass, but running them together (either with the rake task just putting both files on the command line): euclid% spec spec/controllers/crud_resource_controller_spec.rb spec/ controllers/crud_resource_controller_with_join_models_spec.rb /Users/smtlaissezfaire/Sites/rails/dictionary/vendor/rails/ actionwebservice/lib/action_web_service/container/ action_controller_container.rb:74:in `require_web_service_api'': neither _api or _api found (NameError) from /Users/smtlaissezfaire/Sites/rails/dictionary/ven...
2006 Mar 07
7
m:n or multiple 1:n?
I have a Newbee question: i have three tables and want to connect them. so is it stupid to make a triple m:n (rails style xs_ys_zs) or do i have to make a new table (newtable) where i got multiple 1:n? the habtm (has and belongs to many) do only work proper to join two tables, or i am wrong? -jens -- Posted via http://www.ruby-forum.com/.
2006 Jul 10
10
has_many :through and foreign key parameters
I just took my HABTM and turned it into a :through since my join table has another "non-joiny" attribute. I went from this: has_many_and_belongs_to :jobs, :join_table => ''tablename'', :foreign_key => ''x'', :association_foreign_key => ''y'' to this: has_many :jobs, :through =>
2006 Apr 05
4
Self-referential join creation/deletion and :through
Greetings. First, this example is just my way of exploring :through. It probably doesn''t need has_many :through, and could just use a standard HABTM association. Here''s the models: class CourseRequisite < ActiveRecord::Base belongs_to :requisite, :class_name => ''Course'', :foreign_key => ''requisite_id'' belongs_to :course,