Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

...
  • 1 commit
  • 4 files changed
  • 0 commit comments
  • 1 contributor
6 gemfiles/ar-3.2.gemfile
View
@@ -0,0 +1,6 @@
+source "http://rubygems.org"
+
+gem "rake"
+gem "activerecord", "~> 3.2.0"
+
+gemspec :path=>"../"
4 lib/serializable_attributes/schema.rb
View
@@ -73,12 +73,12 @@ def initialize(model, field, options)
meta_model.send(:attr_accessor, "#{data_field}_schema")
@model.send("#{data_field}_schema=", self)
- @model.class_eval do
+ @model.class_eval <<-RUBY
def reload(options = nil)
reset_serialized_data
super
end
- end
+ RUBY
meta_model.send(:define_method, :attribute_names) do
column_names + send("#{data_field}_schema").all_column_names
3  serializable_attributes.gemspec
View
@@ -32,7 +32,7 @@ Gem::Specification.new do |s|
## require 'NAME.rb' or'/lib/NAME/file.rb' can be as require 'NAME/file.rb'
s.require_paths = %w[lib]
- s.add_dependency "activerecord", [">= 2.2.0", "< 3.2.0"]
+ s.add_dependency "activerecord", [">= 2.2.0", "< 3.3.0"]
## Leave this section as-is. It will be automatically generated from the
## contents of your Git repository via the gemspec task. DO NOT REMOVE
@@ -46,6 +46,7 @@ Gem::Specification.new do |s|
gemfiles/ar-2.3.gemfile
gemfiles/ar-3.0.gemfile
gemfiles/ar-3.1.gemfile
+ gemfiles/ar-3.2.gemfile
init.rb
lib/serializable_attributes.rb
lib/serializable_attributes/duplicable.rb
4 test/test_helper.rb
View
@@ -60,7 +60,7 @@ def self.find(n, options)
r
end
- attr_accessor :raw_data
+ attr_accessor :id, :raw_data
serialize_attributes :data do
string :title, :body
@@ -86,7 +86,7 @@ def add_to_transaction
class SerializedRecordWithDefaults < ActiveRecord::Base
extend SerializableMethods
- attr_accessor :raw_data
+ attr_accessor :id, :raw_data
serialize_attributes :data do
string :title, :body, :default => 'blank'

No commit comments for this range

Something went wrong with that request. Please try again.