Skip to content

Instantly share code, notes, and snippets.

View rakeshtembhurne's full-sized avatar
😉
Writing a Book

Rakesh Tembhurne rakeshtembhurne

😉
Writing a Book
View GitHub Profile
@rakeshtembhurne
rakeshtembhurne / ExampleActivation.php
Last active August 29, 2015 14:10 — forked from bumuckl/activation method
Croogo: Code for installing tables while activating croogo plugin
<?php
App::import('Model', 'CakeSchema');
App::import('Model', 'ConnectionManager');
include_once(APP.'plugins'.DS.'pluginname'.DS.'config'.DS.'schema'.DS.'schema.php');
$db = ConnectionManager::getDataSource('default');
//Get all available tables
$tables = $db->listSources();
$CakeSchema = new CakeSchema();
git diff-tree -r --no-commit-id --name-only --diff-filter=ACMRT HEAD~1 HEAD | xargs tar -rf ~/exports/export.tar
<?php
/**
* MultivalidatableBehabior for CakePHP2
*
* @uses ModelBehavior
* @author Dardo Sordi>
* @link http://bakery.cakephp.org/articles/dardosordi/2008/07/29/multivalidatablebehavior-using-many-validation-rulesets-per-model
*/
class MultivalidatableBehavior extends ModelBehavior
{
@rakeshtembhurne
rakeshtembhurne / .gitignore
Created October 2, 2012 05:53
CakePHP: default .gitignore file
# Test URI
# Ignore netbeans folder
nbproject/*
# Ignore private folder
/app/private/*
!/app/private/empty
# Ignore packed asset files
/app/webroot/css/packed/*