On Sep 16, 10:04 am, Walter Lee Davis <[email protected]> wrote:
> I'd like my published boolean to be excluded from the calculation as
> to whether a version is created or not. Can anyone suggest a way to do
> that?
>

Digging into the code a bit, it appears you can specify options to
ignore certain columns.

In lib / vestal_versions / creation.rb,
        # Returns an array of column names that should be included in
the changes of created
        # versions. If <tt>vestal_versions_options[:only]</tt> is
specified, only those columns
        # will be versioned. Otherwise, if
<tt>vestal_versions_options[:except]</tt> is specified,
        # all columns will be versioned other than those specified.
Without either option, the
        # default is to version all columns. At any rate, the four
"automagic" timestamp columns
        # maintained by Rails are never versioned.
        def versioned_columns
          case
            when vestal_versions_options[:only] then
self.class.column_names & vestal_versions_options[:only]
            when vestal_versions_options[:except] then
self.class.column_names - vestal_versions_options[:except]
            else self.class.column_names
          end - %w(created_at created_on updated_at updated_on)
        end

> Thanks,
>
> Walter

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to