Skip to content

Commit

Permalink
Remove active record specific extensions as they are moved to hashie_…
Browse files Browse the repository at this point in the history
…rails
  • Loading branch information
Maxim-Filimonov authored and dblock committed Jun 3, 2014
1 parent 2c8d5d5 commit 7e66bdd
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 28 deletions.
18 changes: 0 additions & 18 deletions lib/hashie/extensions/mash/active_model.rb

This file was deleted.

10 changes: 0 additions & 10 deletions spec/hashie/mash_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -345,16 +345,6 @@ class SubMash < Hashie::Mash
expect(subject).not_to be_respond_to(:xyz)
expect { subject.method(:xyz) }.to raise_error(NameError)
end

it 'does not respond to permitted?' do
expect(subject).to be_respond_to(:permitted?)
klass = Class.new(Hashie::Mash) do
include Hashie::Extensions::Mash::ActiveModel
end
expect(klass.new).not_to be_respond_to(:permitted?)
expect { klass.new.method(:permitted?) }.to raise_error(NameError)
expect { klass.new.permitted? }.to raise_error(ArgumentError)
end
end

context '#initialize' do
Expand Down

2 comments on commit 7e66bdd

@etehtsea
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't get the idea. Hashie often used as internal dependency, so adding additional gem to fix this seems confusing.

@dblock
Copy link
Member

@dblock dblock commented on 7e66bdd Jun 4, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@etehtsea This has a lot of history. The choice was either for developers to write Ruby code or extract it into another gem. See #154 and feel free to pitch in. I decided for an external gem, it makes things clear - Hashie itself should not have any dependencies, even if implicit, much less Rails.

Please sign in to comment.