lib/spontaneous/model/core/publishing.rb in spontaneous-0.2.0.beta4 vs lib/spontaneous/model/core/publishing.rb in spontaneous-0.2.0.beta5

- old
+ new

@@ -5,23 +5,10 @@ module Publishing extend Spontaneous::Concern module ClassMethods - # def current_revision_table - # revision_table(revision) - # end - - # def base_table - # mapper.base_table - # end - - # make sure that the table name is always the correct revision - # def simple_table - # current_revision_table - # end - def revision_table(revision=nil) mapper.revision_table(revision) end def revision_table?(table_name) @@ -64,15 +51,15 @@ def with_editable!(&block) mapper.editable!(&block) end - def with_published(&block) - scope(Spontaneous::Site.published_revision, true, &block) + def with_published(site, &block) + scope(site.published_revision, true, &block) end - def with_published!(&block) - scope!(Spontaneous::Site.published_revision, true, &block) + def with_published!(site, &block) + scope!(site.published_revision, true, &block) end def database Spontaneous.database end