search for: content_component

Displaying 1 result from an estimated 1 matches for "content_component".

2006 Jul 31
1
Use of push_with_attributes
Hi, I have a model class called Page and a corresponding pages table in the db. Is there a way to do Page.new without actually creating a corresponding record in the table? I want to set some values in it and then pass it to the add_content_component() method in the class below which calls push_with_attributes() which will actually create the record in the db? class Page < ActiveRecord::Base has_and_belongs_to_many :contentcomponents ... def add_content_component(content_component) pos = Integer(contentcomponents.size) + 1 c...