similar to: problem using build with has_many :through relationship

Displaying 20 results from an estimated 2000 matches similar to: "problem using build with has_many :through relationship"

2010 Feb 24
4
"Sequence does not exist" for joined model
Hello all, I''m in my 5th month on Ruby on Rails and still learning. I have an application that works fine in sqlite3 and then the boss says he wants it migrated to Oracle. Now, I know very little about Oracle, enough to get into trouble. When I did the migration everything went haywire. Well, I''ve refactored several problems and now I have another. I have two models with a
2008 Sep 07
1
remote_form_for, paths, and partials
hi, i''m having a little trouble rendering a partial that uses a remote_form_for and is in another controller. <%= render :partial => "reviews/new"-%> and in the partial i have only this, inside another controller <% remote_form_for @review do |rv|-%> <%= rv.hidden_field :value, :value => 1 -%> <%= rv.image_submit_tag "thumbsupnc.png" %>
2011 Mar 21
1
Getting user session object in cucumber
Hi, I am learning cucumber. I have integrated the Devise with my rails 3 application. My problem is I have to write a test which will create a project. For that I have to make sure that user should be logged in. So I have written the user login feature first which is working fine. After that I have written the creation of project scenario. Whenever I am running that scenario we are getting an
2010 Dec 03
2
Rails 3 console ...
In the console to check my paths, I used to write ( In Rails 2) include ActionController::UrlWriter then I could test my paths : new_project_path , .... but now in Rails 3 include ActionController::UrlWriter gives an error NameError: uninitialized constant ActionController::UrlWriter sure something changed, any other additional include needed ? thanks fyh -- You received this message
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
2009 Jan 22
0
ActiveLdap belongs_to and has_many associations
Hi, I am trying to use ActiveLdap for authentication in my rails app. But I am running into a problem with the "belongs_to" and "has_many" associations. Here ist how my models look like. class Person < ActiveLdap::Base ldap_mapping :dn_attribute => "uid", :prefix => "ou=People", :classes =>
2006 May 05
0
Missing documentation for find_in_collection? Trying to drill down in a 4 level has_many association fails
I''ve been reading up in ActiveRecord::Associations and playing around with my app via the console and found some interesting methods via the code completion of IRB, but I have no idea how to use them and can only find one hint in the API http://api.rubyonrails.com/classes/ActiveRecord/Associations/ ClassMethods.html It mentions here in the has many associations that if you use the
2007 Jul 29
1
Curious why this doesn't work. (has_many, belongs_to)
Two Models. class Gm < ActiveRecord::Base belongs_to :pool # mode code here. end class Pool < ActiveRecord::Base has_many :gms # mode code here. end Testing code through the console. >> gm_list.each{ | gm | puts " GM name: #{ gm.user_name } belongs to Pool: #{ gm.pool.pool_name } " }; nil GM name: John belongs to Pool: RHP 07-08 Season - Career League GM name:
2006 Jul 04
2
has_many working correctly only on reload!
I have this code that is using svn externals with rails EDGE working fine for the past couple of months. A couple of days ago, this code died. Even after deleting vendor/rails, this code doesnt work: class Tag < ActiveRecord::Base has_many :taggings has_many :events, :through => :taggings has_many :users, :through => :taggings end class User < ActiveRecord::Base # Virtual
2007 Apr 12
1
What''s mongrel doing when it''s idle.
A totally idle mongrel seems to wake up about once a second doing a little stuff like: select(4, [3], [], [], {0, 999696}) = 0 (Timeout) gettimeofday({1176400534, 112594}, NULL) = 0 select(4, [3], [], [], {0, 0}) = 0 (Timeout) time(NULL) = 1176400534 time(NULL) = 1176400534 gettimeofday({1176400534, 113841},
2006 Jul 31
0
Issues with has_many, belongs_to and dependency settings
I have 2 models SmsAddress & OutboundSmsAtom SmsAddress { has_many :other_objects, :dependency => :nullify } OutboundSmsAtom { #note this object also "belongs_to" other objects if that matters belongs_to :this_object } Whenever I try to destroy an object of type ThisObject, which at the time has 0 "children" OtherObjects I get the following type of
2010 Aug 19
1
has_many :through question
I am trying to create an association table using the ":through" option in "has_many" but not having success. I have created the necessary migrations of the association tables and run rake db:migrate I have the following model: class Group < ActiveRecord::Base has_many :users, :through => :group_user has_many :invites, :through => :group_invite, :class_name =>
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 31
2
ambiguous column name in has_many :through
In my application model I have three classes: Accounts, Projects, and Items class Accounts < ActiveRecord::Base has_many :items, :through => :projects, :source => :items has_many :late_items, :class_name => ''Item'', :through => :projects, :conditions => [''due_on < ?'', Time.now], :source => :items end class Projects <
2019 Apr 26
0
[PATCH 06/10] s390/cio: add basic protected virtualization support
As virtio-ccw devices are channel devices, we need to use the dma area for any communication with the hypervisor. This patch addresses the most basic stuff (mostly what is required for virtio-ccw), and does take care of QDIO or any devices. An interesting side effect is that virtio structures are now going to get allocated in 31 bit addressable storage. Signed-off-by: Halil Pasic <pasic at
2019 May 23
0
[PATCH v2 3/8] s390/cio: add basic protected virtualization support
From: Halil Pasic <pasic at linux.ibm.com> As virtio-ccw devices are channel devices, we need to use the dma area for any communication with the hypervisor. It handles neither QDIO in the common code, nor any device type specific stuff (like channel programs constructed by the DASD driver). An interesting side effect is that virtio structures are now going to get allocated in 31 bit
2019 May 29
0
[PATCH v3 3/8] s390/cio: add basic protected virtualization support
From: Halil Pasic <pasic at linux.ibm.com> As virtio-ccw devices are channel devices, we need to use the dma area for any communication with the hypervisor. It handles neither QDIO in the common code, nor any device type specific stuff (like channel programs constructed by the DASD driver). An interesting side effect is that virtio structures are now going to get allocated in 31 bit
2019 Jun 12
0
[PATCH v5 3/8] s390/cio: add basic protected virtualization support
As virtio-ccw devices are channel devices, we need to use the dma area within the common I/O layer for any communication with the hypervisor. Note that we do not need to use that area for control blocks directly referenced by instructions, e.g. the orb. It handles neither QDIO in the common code, nor any device type specific stuff (like channel programs constructed by the DASD driver). An
2010 Oct 11
0
Converting observe_field to UJS in Rails 3
I am trying to rewrite my website in Rails 3 and Ruby 1.9.2. Can some one help me convert my observe_field which is working under Rails 2.3.5 to Rails 3. I would like to avoid using JQuery as over the last year everything I have tried in JQuery has failed, including this one. Perhaps due to my lack of knowledge. I would not like to install the legacy upgrade. What I have in my website is several
2010 Dec 23
0
has_many :through full stack help
I am trying to implement HMT for the first time and having a ton of trouble. I would like to be able to have the user check a checkbox and fill some extra fields for data input. I have tried so many iterations borrowed from different places I found on the web, none seem to work quite right. Essentially I have two models: ''practice'' and ''system'' where a