Skip to content

Instantly share code, notes, and snippets.

View vocino's full-sized avatar

Vocino vocino

View GitHub Profile
<?php
function adname() {
$adname = str_replace(' ', '', get_bloginfo ( 'name' ));
echo $adname;
}
?>
- @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*
RewriteCond %{HTTP_HOST} ^www\.(.+)$
RewriteRule ^(.*)$ http://%1$1 [R=301,L]
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
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"
.container {
margin-left: auto;
margin-right: auto;
width: 960px;
}
.col_1,
.col_2,
.col_3,
.col_4,
<style>
form dt {
clear:both;
width:33%;
float:left;
text-align:right;
}
form dd {
. .................,MMMM~...MMD8MM ...
. ...............MM... NMMM....MM
... .................M.......:M ...MM...
...................MM........:MMMMN .
....... =M ..........
.... . . . ..MM . .... ......
....... =MMMMMM7?~IZMMMMMM. ..........
.ZMMMMM:MMM.................MMM~NMMMMO..
MM...MMM.......................MMD...MM.
M..+MD...........................MM ..MO
.slide-bg{position:relative;}
.slide-lt{left:25px; position:absolute;}
.slide-rt{right:25px; position:absolute;}
def sendmail
@attendee = Attendee.find(params[:id])
AttendeeMailer.deliver_invite_email(@attendee)
end
<td><%= link_to 'Email', attendee, :action => :sendmail %> |</td>