Skip to content

Commit

Permalink
Added support for configure block
Browse files Browse the repository at this point in the history
  • Loading branch information
dwbutler committed Jan 7, 2013
1 parent 7a7483e commit fefc0cd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/paper_trail.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ def self.paper_trail_store
def self.config
@@config ||= PaperTrail::Config.instance
end

def self.configure
yield config
end

end

Expand Down
4 changes: 3 additions & 1 deletion test/unit/serializer_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ class SerializerTest < ActiveSupport::TestCase

context 'Custom Serializer' do
setup do
PaperTrail.config.serializer = CustomSerializer
PaperTrail.configure do |config|
config.serializer = CustomSerializer
end

Fluxor.instance_eval <<-END
has_paper_trail
Expand Down

0 comments on commit fefc0cd

Please sign in to comment.