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
| rand_id = rand(Product.count) | |
| rand_record = Product.first(:conditions => [ "id >= ?", rand_id]) |
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 ApplicationController < ActionController::Base | |
| include InheritedResources::DSL | |
| protect_from_forgery | |
| before_filter :categories_for_menu | |
| private | |
| def categories_for_menu | |
| @root_category, @menu_categories = Category.arrange.first |
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
| require 'spec_helper' | |
| describe ApplicationController do | |
| controller(ApplicationController) do | |
| def index | |
| render :nothing => true | |
| end | |
| end | |
| it "loads categories for side menu" do |
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
| # /usr/local/nginx/conf/rails-vhosts/kdcuk.co.uk.conf | |
| server { | |
| listen 212.110.170.198:80; | |
| server_name kdcuk.co.uk; | |
| root /home/kdcuk/domains/kdcuk.co.uk/current/public; # <--- be sure to point to 'public'! | |
| passenger_enabled on; | |
| rack_env production; | |
| } | |
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
| package tv_a1 | |
| import ( | |
| "fmt" | |
| "testing" | |
| ) | |
| type Vcpu struct { | |
| } |
OlderNewer