Rechercher une page de manuel
Jifty::Plugin::ActorMetadata::Mixin::Model::ActorMetadata.3pm
Langue: en
Version: 2007-12-26 (ubuntu - 07/07/09)
Section: 3 (Bibliothèques de fonctions)
Sommaire
NAME
Jifty::Plugin::ActorMetadata::Mixin::Model::ActorMetadata - ActorMetadata mixinSYNOPSIS
package MyApp::Model::CoffeeShop; use Jifty::DBI::Schema; use MyApp::Record schema { # custom column defrinitions }; use Jifty::Plugin::ActorMetadata::Mixin::Model::ActorMetadata; # created_by, created_on, updated_on
DESCRIPTION
SCHEMA
This mixin adds the following columns to the model schema:created_by
created_on
updated_on
METHODS
# XXX: podcoverage should count parent classes. these pods are uselessregister_triggers
Adds the triggers to the model this mixin is added to.before_create
Sets "created_by", "created_on", "updated_on" based on the current user and time.current_user_can
Rejects creation unless there's a current_user. Rejects update or deletion unless the current_user is the creator. (Jesse says: this feels like wrong logic for this mixin)current_user_is_owner
Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre