No commit activity in last 3 years
No release in over 3 years
The active record's adapter to the database created by Movable Type
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 3.1.3

Runtime

>= 0
 Project Readme

ActsAsMtObject¶ ↑

Acts as Movable Type’s object.

Features¶ ↑

  • Setup aliases. (e.g. “title” to “entry_title”)

  • Can access meta table data.

  • Can access custom fields data.

  • Only “mysql2” adapter is supported.

Problems¶ ↑

  • Can’t save meta table data.

  • Can’t save custom fields data.

Install¶ ↑

Put this line in your Gemfile:

gem 'acts_as_mt_object'

Then bundle:

$ bundle

Example¶ ↑

Include¶ ↑

class MT::Entry < ActiveRecord::Base
  acts_as_mt_object
end

or

class Plan < ActiveRecord::Base
  acts_as_mt_object :mt_class => :Entry
end

Usage¶ ↑

> entry = MT::Entry.find(343)  # find by entry_id
 => #<MT::Entry entry_id: 343 ...
> entry.title  # column data
 => "Title"
> entry.current_revision  # meta data
 => 1
> entry.price # custom field's data
 => 30000

Copyright 2011-2012 ToI Inc., released under the MIT license