laserlemon / vestal_versions

Keep a DRY history of your ActiveRecord models' changes
MIT License
934 stars 229 forks source link

Strange info in the modification column #87

Open justintanner opened 11 years ago

justintanner commented 11 years ago

Getting strange strings in the modification column:


---
!binary "Zmlyc3RfbmFtZQ==":
- Steve
- Stephen

(trying to get vestal_versions to work with rails 3.2.9)

justintanner commented 11 years ago

Is:

!binary "Zmlyc3RfbmFtZQ==":

Normal, if so what is that?

justintanner commented 11 years ago

Ah looks like the serialization in ruby 1.9.3-p325 and rails 3.29 is broken. All tests will pass because its serializing in a new format, but past compatibility with the versions table will be broken.

Investigating.

dreamr commented 11 years ago

Thank you, we all appreciate your efforts.

I was slammed with a new job and the desperate need for money this week, but it is now the weekend, and I am going to give the project enough love to get us up and running with 3.2.x and above.

James

On Sat, Dec 15, 2012 at 9:16 AM, justintanner notifications@github.comwrote:

Ah looks like the serialization in ruby 1.9.3-p325 and rails 3.29 is broken. All tests will pass because its serializing in a new format, but pass compatibility with the versions table will be broken.

Investigating.

— Reply to this email directly or view it on GitHubhttps://github.com/laserlemon/vestal_versions/issues/87#issuecomment-11406717.

justintanner commented 11 years ago

No problem, I've got a hacky workaround at the moment for version.rb

class ForceYAML
  YAML::ENGINE.yamler='syck'      
  def self.load(text)
    return if text.blank?
    YAML::load(text)
  end

  def self.dump(text)
    YAML::dump(text)
  end
end

serialize :modifications, ForceYAML

Looks like YAML serialization in rails 3.2.9 and ruby 1.9.3-p325 uses a new encoding scheme for column names. Maybe there is a cleaner way todo this.

dreamr commented 11 years ago

Put in a pull request and I will massage it into whatever form it takes

On Sat, Dec 15, 2012 at 10:37 AM, justintanner notifications@github.comwrote:

No problem, I've got a hacky workaround at the moment for version.rb

class ForceYAML YAML::ENGINE.yamler='syck' def self.load(text) return if text.blank? YAML::load(text) end

def self.dump(text) YAML::dump(text) end end

serialize :modifications, ForceYAML

Looks like YAML serialization in rails 3.2.9 and ruby 1.9.3-p325 uses a new encoding scheme for column names. Maybe there is a cleaner way todo this.

— Reply to this email directly or view it on GitHubhttps://github.com/laserlemon/vestal_versions/issues/87#issuecomment-11408343.

justintanner commented 11 years ago

on the "rails_3" branch?