This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class PostsController < ActionController::Base | |
| def create | |
| Post.create(post_params) | |
| end | |
| def update | |
| Post.find(params[:id]).update_attributes!(post_params) | |
| end | |
| private |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Running and install of twitter bootstrap rails | |
| rails g bootstrap:install | |
| rails g bootstrap:layout [LAYOUT_NAME] [*fixed or fluid] | |
| Running Rspec installation | |
| group :development, :test do | |
| gem 'turn' | |
| gem 'rspec-rails' | |
| gem 'capybara' | |
| gem 'factory_girl_rails' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class OauthController < ApplicationController | |
| class ApiOAuthError < StandardError | |
| attr_accessor :code, :description, :uri, :state | |
| def initialize(code, description, uri = nil, state = nil) | |
| @code = code | |
| @description = description | |
| @uri = uri |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if ($handle = fopen($csv_file, 'r')) | |
| { | |
| $all_headings = array_unique(explode(',', trim(fgets($handle)))); | |
| foreach ($all_headings as $heading) | |
| { | |
| if ( ! $heading) | |
| { | |
| break; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); | |
| /** | |
| * | |
| * @package Bread_crumb | |
| * @author John Kamuchau , [email protected] | |
| * @copyright Copyright (c) 2009, Web Flame , www.webflame.com.au/ | |
| * @license http://www.webflame.com.au/ | |
| * @link http://www.webflame.com.au/ | |
| * @since Version 1.0 | |
| * @filesource |
NewerOlder