This file contains 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
HomeController.class_eval do | |
def index | |
@searcher = Spree::Config.searcher_class.new(params) | |
@products = @searcher.retrieve_products | |
respond_with(@products) | |
respond_with do |format| | |
format.html { render :action => params[:path] } | |
format.iphone { render :layout => false } | |
end |
This file contains 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 products.any? %> | |
<ul id="products" title="<%= t(:search_results, :keywords => h(params[:keywords])) %>" selected="true" class="product-listing" data-hook> | |
<% products.each do |product| %> | |
<% if Spree::Config[:show_zero_stock_products] || product.has_stock? %> | |
<li id="product_<%= product.id %>" data-hook="products_list_item"> | |
<%= link_to product.name, product, :class => 'info' %> | |
<span class="price selling"><%= product_price(product) %></span> | |
</li> | |
<% end %> | |
<% end %> |
This file contains 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/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:52:in `initialize': Valid types are [:development, :runtime], not nil (ArgumentError) | |
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.21/lib/bundler/resolver.rb:352:in `new' | |
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.21/lib/bundler/resolver.rb:352:in `search' | |
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.21/lib/bundler/resolver.rb:346:in `gems_size' | |
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.21/lib/bundler/resolver.rb:179:in `resolve' | |
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:95:in `sort_by' | |
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.21/lib/bundler/resolver.rb:175:in `each' | |
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.21/lib/bundler/resolver.rb:175:in `sort_by' | |
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.21/lib/bundler/resolver.rb:175:in `resolve' | |
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.21/lib/bundler/resolver.rb:160:in `start' |
This file contains 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
# Controller | |
respond_to :html, :js | |
# DELETE /users/1 | |
def destroy | |
@student = User.find(params[:id]) | |
@student.destroy | |
respond_with(@student) | |
rescue | |
puts $!.inspect, $@ | |
render :nothing => true |
This file contains 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
// Mixins | |
@mixin hover-ease($element, $time) { | |
-moz-transition: $element $time + s ease; | |
-o-transition: $element $time + s ease; | |
-webkit-transition: $element $time + s ease; | |
-ms-transition: $element $time + s ease; | |
} | |
@mixin corners($radius) { | |
-webkit-border-radius: $radius; | |
-moz-border-radius: $radius; |
This file contains 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
!!! | |
%html{ :xmlns => 'http://www.w3.org/1999/xhtml', :lang => 'en', 'xml:lang' => 'en' } | |
%head | |
%title Zenquest | |
%meta{ 'http-equiv' => 'Content-Type', :content => 'text/html; charset=utf-8' } | |
%link{ :rel => 'stylesheet', :href => '//netdna.bootstrapcdn.com/twitter-bootstrap/2.2.1/css/bootstrap.no-responsive.no-icons.min.css', :type => 'text/css' } | |
%link{ :rel => 'stylesheet', :href => '//netdna.bootstrapcdn.com/font-awesome/2.0/css/font-awesome.css', :type => 'text/css' } | |
%link{ :rel => 'stylesheet', :href => '/screen.css', :type => 'text/css' } | |
%body |
This file contains 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 'rubygems' | |
require 'zencoder' | |
# Change these settings | |
s3_bucket = '' | |
Zencoder.api_key = '' | |
# Quick test to make sure the variables above are set... | |
if s3_bucket == '' || Zencoder.api_key == '' | |
puts "It appears you haven't set your S3 bucket or Zencoder API key..." |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title></title> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width"> | |
<link href="http://vjs.zencdn.net/4.0/video-js.css" rel="stylesheet"> |