Showing posts with label framework. Show all posts
Showing posts with label framework. Show all posts

YII, change default controller

  • 0
File main.php
return array(
    'basePath' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '..',
    'name' => 'My application',
    'defaultController' => 'myController/myAction',   // <-- Use this code to change default controller

How to check date range on rails?

(Time.now.to_date - 2.days.ago.to_date).to_i

Description :
Time.now.to_date we will get date now with format : Fri, 5 Aug 2014
use to_i to return range date