search for: parentmodel

Displaying 3 results from an estimated 3 matches for "parentmodel".

Did you mean: parent_model
2011 Sep 07
4
rspec testing inheritance
Hello, Is there any way to test model inheritance in spec? something like.. it { ChildModel.should < ParentModel } thanks.
2006 Oct 19
1
Question about variable assignments/scoping after render call
...are made available to templates. We have a test that looks something like this: def test_variable_assigned xhr :get, :do_stuff, :id => 1 assert_not_nil assigns(:thing) end And our app code looks like this: class SuperClass < ActionController def do_stuff @parent_model = ParentModel.find(params[:id]) render :template => ''superclass/do_stuff'' end end class SubClass < SuperClass def do_stuff super @thing = @parent_model.thing end end When we run our tests with the code above, it fails saying that assigns(:thing) is nil. If we...
2006 Jun 07
3
trouble wtih webstore schema, handling product variations
Hi Railers, Does anyone have any guidance on setting up a simple way to handle product variations (e.g garment size/color)? Initially, I had thought that I would make a variation model which defined the extra bits, but it seems quite inflexible especially so if a store were to sell non-clothing items that also had variants of one flavor or another. product has_many variations title