Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 4 files changed
  • 0 commit comments
  • 1 contributor
View
6 gemfiles/ar-3.2.gemfile
@@ -0,0 +1,6 @@
+source "http://rubygems.org"
+
+gem "rake"
+gem "activerecord", "~> 3.2.0"
+
+gemspec :path=>"../"
View
4 lib/serializable_attributes/schema.rb
@@ -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
View
3  serializable_attributes.gemspec
@@ -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
View
4 test/test_helper.rb
@@ -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.