lib/toolhound-ruby/base.rb in toolhound-ruby-1.0.7 vs lib/toolhound-ruby/base.rb in toolhound-ruby-1.0.8

- old
+ new

@@ -36,14 +36,20 @@ # def self.connection # @connection ||= Toolhound.connection # end # - def initialize(connection, options = {}) - @connection = connection + def initialize(client, options = {}) + @client = client # @original = attrs # self.attributes = transform_attributes(attrs) end + + def connection + @client.connection + end + + def table_name name = self.class.table_name || demodulize(self.class.name) formatted_table_name(name) end def primary_key