Skip to content

Commit

Permalink
moved content_model_id define method to be always created
Browse files Browse the repository at this point in the history
  • Loading branch information
cykod committed Mar 9, 2010
1 parent 49e87e8 commit 1be38ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/content/content_model_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ def identifier_name
end

content_model_id = self.id
cls.send(:define_method,:content_model_id) { content_model_id }
if self.create_nodes?
cls.content_node :container_type => 'ContentModel',:container_field => :content_model_id
cls.has_one :content_node, :foreign_key => :node_id, :conditions => "node_type = " + DomainModel.connection.quote(class_name)
cls.send(:define_method,:content_model_id) { content_model_id }
cls.send(:define_method,:build_content_node) do
ContentNode.new(:node_type => class_name, :node_id => self.id)
end
Expand Down

0 comments on commit 1be38ed

Please sign in to comment.