Displaying 2 results from an estimated 2 matches for "operation_id".
Did you mean:
operation_
2011 Jul 11
2
Can't get this Rspec test to pass
Hello,
I''m completely new to Rspec testing and I''m finding it very difficult to
mock specific objects.
In this test, I have a before block setup as such:
[code]
before do
setup_controller_for_warden
controller.session[:operation_id] = 1
@operator = Factory :operator
sign_in :operator, @operator
@persist_herd = Herd.new
@persist_herd.operation_id = 1;
@persist_herd.herd_name = ''Persisted Herd
(herd_rations_controller_spec)''
@persist_herd.save!
end
describe "GET n...
2005 Aug 28
6
ActiveRecord Question
Hi all
I am new to Rails, and obviously I''m missing something, I''ll get straight to the question:
A User has many operations (granted to her), each Operation is associated with an OperationType. Each Operation may be associated with more then one User.
So the model goes like this:
class User < ActiveRecord::Base
has_and_belongs_to_many :operations