Skip to content

Instantly share code, notes, and snippets.

View vocino's full-sized avatar

Vocino vocino

View GitHub Profile
.container {
margin-left: auto;
margin-right: auto;
width: 960px;
}
.col_1,
.col_2,
.col_3,
.col_4,
class Photo < ActiveRecord::Base
belongs_to :portfolio
has_attached_file :image, :styles => {:full => ["440x9999>", :jpg],
:medium => ["200x255#", :jpg],
:large => ["440x555#", :jpg]},
:processors => [:cropper],
:storage => :cloud_files,
:cloudfiles_credentials => "#{RAILS_ROOT}/config/rackspace_cloudfiles.yml"
NoMethodError in PhotosController#update
undefined method `read' for #<CloudFiles::StorageObject:0x103e96d40>
RAILS_ROOT: /Users/Travis/Development/folioly
Application Trace | Framework Trace | Full Trace
/Users/Travis/.gem/ruby/1.8/gems/paperclip-cloudfiles-2.3.1.1.5/lib/paperclip/attachment.rb:228:in `reprocess!'
/Users/Travis/Development/folioly/app/models/photo.rb:45:in `reprocess_image'
Request
RewriteCond %{HTTP_HOST} ^www\.(.+)$
RewriteRule ^(.*)$ http://%1$1 [R=301,L]
- @object.photos.each_with_index do |photo, i|
-if i == 0
*do stuff*
- elsif i == 1
*do more stuff*
- else
*do the rest of thes tuff*
<?php
function adname() {
$adname = str_replace(' ', '', get_bloginfo ( 'name' ));
echo $adname;
}
?>