Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

137 lines (103 sloc) 6.242 kb
- Make find_by_id lookups faster by indexing records by id (desmondmonster)
- Validate IDs are unique by caching them in a set (desmondmonster)
- Support for has_one associations (kbrock)
- Allow gems like simple_form to read metadata about belongs_to associations that point to active hash objects (kbrock)
- Move specs to appraisal (flavorjones)
2012-01-18 (v0.9.8)
- Make ActiveHash.find with array raise an exception when record cannot be found (mocoso)
2011-09-18 (v0.9.7)
- Fixing the setting of a belongs_to_active_hash association by association (not id).
- added a module which adds a .belongs_to_active_hash method to ActiveRecord, since it was broken for Rails 3.1 (thanks to felixclack for pointing this issue out)
- fixed bug where .find would not work if you defined your ids as strings
- fixed deprecation warnings for class_inheritable_accessor (thanks scudco!)
- added basic compatibility with the `where` method from Arel (thanks rgarver!)
- better dependency management and compatibility with ActiveSupport 2.x (thanks vandrijevik!)
- improved method_missing errors for dynamic finders
- prevent users from trying to overwrite :attributes (
- ruby 1.9.2 compatibility
- added dependency on ActiveModel
- add persisted? method to ActiveHash::Base
- ActiveHash::Base#save takes *args to be compatible with ActiveModel
- ActiveHash::Base#to_param returns nil if the object hasn't been saved
- Use Ruby's definition of "word character" (numbers, underscores) when forming ActiveHash::Enum constants (tstuart)
- Get ActiveHash::Associations to return a scope for has_many active record relationships (mocoso)
- Allow find_by_* methods to accept an options hash, so rails associations don't blow up
- Add conditions to ActiveHash#all (Ryan Garver)
- Add #cache_key to ActiveHash::Base (Tom Stuart)
- Add banged dynamic finder support to ActiveHash::Base (Tom Stuart)
- Enum format now uses underscores instead of removing all characters
- Removed test dependency on acts_as_fu
- Silence metaclass deprecation warnings in active support 2.3.8
- When calling ActiveFile::Base.reload do not actually perform the reload if nothing has been modified unless you call reload(true) to force (Michael Schubert)
- When ActiveRecord model belongs_to an ActiveHash and the associated id is nil, returns nil instead of raising RecordNotFound (Jeremy Weiskotten)
- Merged Nakajima's "add" alias for "create" - gotta save those ASCII characters :)
- Removed "extend"-related deprecations - they didn't play well with rails class loading
- Added stub for #destroyed? method, since Rails associations now depend on it
- Added ActiveHash::Enum (John Pignata)
- Deprecated include ActiveHash::Associations in favor of extend ActiveHash::Associations
- Fixed bug where you can't set nil to an association
- Calling #belongs_to now creates the underlying field if it's not already there (belongs_to :city will create the :city_id field)
- Fixed a bug where belongs_to associations would raise an error instead of returning nil when the parent object didn't exist.
- Added #[] and #[]= accessors for more ActiveRecord-esque-ness. (Pat Nakajima & Dave Yeu)
- Add marked_for_destruction? to be compatible with nested attributes (Brandon Keene)
- Added second parameter to respond_to? and cleaned up specs (Brian Takita)
- Find with an id that does not exist now raises a RecordNotFound exception to mimic ActiveRecord (Pat Nakajima)
- added setters to ActiveHash::Base for all fields
- instantiating an ActiveHash object with a hash calls the setter methods on the object
- boolean default values now work
- Removed auto-reloading of files based on mtime - maybe it will come back later
- Made ActiveFile::Base.all a bit more sane
- added ActiveHash::Base.has_many, which works with ActiveRecord or ActiveHash classes (thanks to baldwindavid)
- added ActiveHash::Base.belongs_to, which works with ActiveRecord or ActiveHash classes (thanks to baldwindavid)
- added .delete_all method that clears the in-memory array
- added support for Hash-style yaml (think, Rails fixtures)
- added setter for parent object on belongs_to ( city =; city.state = State.first; city.state_id == )
- auto-assign fields after calling data= instead of after calling .all
- remove require 'rubygems', so folks with non-gem setups can still use AH
- added more specific activesupport dependency to ensure that metaclass is available
- AH no longer calls to_i on ids. If you pass in a string as an id, you'll get a string back
- Fancy finders, such as find_all_by_id_and_name, will compare the to_s values of the fields, so you can pass in strings
- You can now use ActiveHash models as the parents of polymorphic belongs_to associations
- save, save!, create and create! now add items to the in-memory collection, and naively adds autoincrementing id
- new_record? returns false if the record is part of the collection
- ActiveHash now works with Fixjour!
- Added custom finders for multiple fields, such as .find_all_by_name_and_age
- Added support for auto-defining methods based on hash keys in ActiveHash::Base
- Changed the :field and :fields API so that they don't overwrite existing methods (useful when ActiveHash auto-defines methods)
- Fixed a bug where ActiveFile incorrectly set the root_path to be the path in the gem directory, not the current working directory
- ActiveFile no longer reloads files by default
- Added ActiveFile.reload_active_file= so you can cause ActiveFile to reload
- Setting data to nil correctly causes .all to return an empty array
- Added reload(force) method, so that you can force a reload from files in ActiveFile, useful for tests
Jump to Line
Something went wrong with that request. Please try again.