Skip to content

Instantly share code, notes, and snippets.

View mikespokefire's full-sized avatar

Michael Smith mikespokefire

View GitHub Profile
class AdminController < ApplicationController
layout "admin"
http_basic_authenticate_with :name => "user", :password => "password"
end
def index
@all_coasters = Coaster.all
@coasters = @all_coasters
Coaster.include_root_in_json = false
end
var myFunc = function() {
console.log(this); //currently outs DOMelement
};
if ($('body.home').length) {
$('.slideshow').cycle({
after: myFunc
});
}
namespace :flickr do
desc "Pull all data from Flickr"
task :pull => :environment do
# Remove everything to do with the gallery
#Album.destroy_all
#Photo.destroy_all
def pending_orders?
orders.where(:status => Order::PENDING).exists?
end
@mikespokefire
mikespokefire / controller
Created January 26, 2012 13:02 — forked from anonymous/controller
search
class LoginController < ApplicationController
def overview
@student = Student.search params[:search]
end