Instantrails is the best way to setup rails server on windows as it is very easy install and setup .No hassles at all. Installing Instantrails is just an extraction operation. Updating it to the latest version is just easy as installing. Here is how we do it Open up a ruby console via the instantrails [...]
Archive for the ‘Website Design’ Category
Easy pagination and sorting : codeigniter
Pagination is a piece of cake in codeigniter but adding sorting columns is one heck of a task. This is how i did it The Controller <?php class View extends Controller { function view() { parent::Controller(); $this->load->helper(‘url’); $this->load->library(‘pagination’); } function orders() { //page title $data['title']=’Page Title’; //pagination configurations $config['total_rows'] = $this->db->get(‘dbname’)-> num_rows(); $config['per_page'] = ’50′; [...]
talk to the database from a helper : Codeigniter
Recently I had to get a particular data in almost every view so, it became in a way redundant to pass the data to the view every time. Thus, to overcome this problem i created a helper of my own that could make queries to the database and get required results. This is how i [...]