FreeBSD.software
Home/devel/rubygem-active_hash

rubygem-active_hash

4.0.0devel

Include the ability to specify data using hashes, yml files or JSON files

ActiveHash is a simple base class that allows you to use a ruby hash as a readonly datasource for an ActiveRecord-like model. ActiveHash assumes that every hash has an :id key, which is what you would probably store in a database. This allows you to seamlessly upgrade from ActiveHash objects to full ActiveRecord objects without having to change any code in your app, or any foreign keys in your database. It also allows you to use #has_many and #belongs_to (via belongs_to_active_hash) in your AR objects. ActiveHash can also be useful to create simple test classes that run without a database - ideal for testing plugins or gems that rely on simple AR behavior, but don't want to deal with databases or migrations for the spec suite. ActiveHash also ships with: - ActiveFile: a base class that you can use to create file data sources - ActiveYaml: a base class that will turn YAML into a hash and load the data into an ActiveHash object

$pkg install rubygem-active_hash
github.com/active-hash/active_hash
Origin
devel/rubygem-active_hash
Size
83.7KiB
License
MIT
Maintainer
sunpoet@FreeBSD.org
Dependencies
3 packages
Required by
1 packages

Dependencies (3)

Required By (1)