Project

cordage

0.0
No commit activity in last 3 years
No release in over 3 years
Flexible record based associations in ActiveFedora models.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

~> 3.2.13
 Project Readme

cordage

Flexible record based associations in ActiveFedora models.

Cordage creates a one-way association between an ActiveFedora object and an ActiveRecord object.

Install

gem install cordage

Example

 # app/models/user.rb
 class User < ActiveRecord::Base

 end
  # app/models/video.rb
  class Video < ActiveFedora::Base
    cordage :managers, class_name: 'User'
  end
  # app/controllers/videos_controller.rb
  video = Video.new
  video.managers << User.first
  video.save

Options

  cordage :managers,
    class_name: 'User',  # required if different than association name
    primary_key: 'id', # optional