GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Jifty::Plugin::ActorMetadata::Mixin::Model::ActorMetadata(3) User Contributed Perl Documentation Jifty::Plugin::ActorMetadata::Mixin::Model::ActorMetadata(3)

Jifty::Plugin::ActorMetadata::Mixin::Model::ActorMetadata - ActorMetadata mixin

  package MyApp::Model::CoffeeShop;
  use Jifty::DBI::Schema;
  use MyApp::Record schema {
      # custom column definitions
  };

  use Jifty::Plugin::ActorMetadata::Mixin::Model::ActorMetadata; # created_by, created_on, updated_on and updated_by

This mixin adds the following columns to the model schema:

# XXX: pod coverage should count parent classes. this pod is useless

Adds the triggers to the model this mixin is added to.

Sets "created_by", "created_on", "updated_on" and "updated_by" based on the current user and time.

update "updated_on" and "updated_by" based on the current user and current time.

Rejects creation unless there's a current_user.

to be more flexible, we allow some configurations like: e.g. use Jifty::Plugin::ActorMetadata::Mixin::Model::ActorMetadata user_class => 'Foo::Model::Principal', map => { created_by => 'creator', created_on => 'created' }

current valid args are: user_class => 'Foo::Model::User' class that you want created_by and updated_by to be refers_to map => { created_by => 'creator', ... } the real column name you want to use. this also controls whether a column will be added or not. i.e. if the hashref is { created_by => 'creator', created_on => 'created' }, then columns 'updated_by' and 'updated_on' will not be added.

2013-01-29 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.