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
--- a/vendor/plugins/paperclip/lib/paperclip/storage.rb | |
+++ b/vendor/plugins/paperclip/lib/paperclip/storage.rb | |
@@ -243,7 +243,7 @@ module Paperclip | |
@cloudfiles_options = @options[:cloudfiles_options] || {} | |
@cf = CloudFiles::Connection.new(@cloudfiles_credentials[:username], @cloudfiles_credentials[:api_key]) | |
@url = ":cf_path_url" unless @url.to_s.match(/^:cf.*url$/) | |
- @path = options[:path] || ":attachment/:id/:style/:basename.:extension" | |
+ @path = @options[:path] || ":attachment/:id/:style/:basename.:extension" | |
end | |
base.class.interpolations[:cf_path_url] = lambda do |attachment, style| |
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
diff --git a/vendor/plugins/paperclip/lib/paperclip/storage.rb b/vendor/plugins/paperclip/lib/paperclip/storage.rb | |
index 396962b..cb048e5 100644 | |
--- a/vendor/plugins/paperclip/lib/paperclip/storage.rb | |
+++ b/vendor/plugins/paperclip/lib/paperclip/storage.rb | |
@@ -276,7 +276,7 @@ module Paperclip | |
@path = Paperclip::Attachment.default_options[:path] == @options[:path] ? ":attachment/:id/:style/:basename.:extension" : @option | |
end | |
base.class.interpolations[:cf_path_url] = lambda do |attachment, style| | |
- attachment.cloudfiles_container.object(attachment.path).public_url | |
+ attachment.cloudfiles_container.object(attachment.path(style)).public_url |
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
<div class='image'> | |
<% new_or_existing = image.new_record? ? 'new' : 'existing' %> | |
<% prefix = "work[#{new_or_existing}_image_attributes][]"%> | |
<% fields_for prefix, image do |f| %> | |
<p> | |
<%= f.label :caption %><br /> | |
<%= f.text_field :caption %> | |
</p> | |
<p> |
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 'spec_helper' | |
class MyObject | |
include Mongoid::Document | |
include Mongoid::Timestamps | |
include Mongoid::Paranoia | |
include Sunspot::Rails::Searchable | |
field :title, type: String | |
validates_presence_of :title | |
attr_accessible :title |
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
# in application.rb | |
# prevent Redis from caching assets | |
config.action_dispatch.rack_cache = nil |
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
We've spent more time at museums than seeing contemporary art. Highlights: | |
Nefertiti and the Light of Amarna show at Neues Museum. That museum is also an amazing example of mixing new architecture with old as part of a restoration. The Nefertiti bust isn't hyped. It really is an amazing work of art. | |
Museum Island in general is pretty amazing. You can buy a 1-day pass good just for it. | |
A 3-day museum pass can be bought at any of the Museum Island museums, and also gets you into a number of others, including the Neue Nationalgalerie. | |
The Neue Nationalgalerie (designed by Mies van der Rohe) has a very interesting take on post-war art in the current permanent collection show. It's quite different from the history we see from MoMA. |
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
We've spent more time at museums than seeing contemporary art. Highlights: | |
Nefertiti and the Light of Amarna show at Neues Museum. That museum is also an | |
amazing example of mixing new architecture with old as part of a restoration. | |
The Nefertiti bust isn't hyped. It really is an amazing work of art. | |
Museum Island in general is pretty amazing. You can buy a 1-day pass good | |
just for it. | |
A 3-day museum pass can be bought at any of the Museum Island museums, |
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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"log" | |
"net/http" | |
) | |
type Organization struct { |
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
{ | |
"Statement": [ | |
{ | |
"Action": "s3:*", | |
"Effect": "Allow", | |
"Resource": [ | |
"arn:aws:s3:::mybucket", | |
"arn:aws:s3:::mybucket/*" | |
] | |
} |
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
module.exports = function(grunt) { | |
grunt.initConfig({ | |
jshint: { | |
files: ['Gruntfile.js', 'app/assets/javascripts/pages/**/*.js', 'test/**/*.js'], | |
options: { | |
// options here to override JSHint defaults | |
globals: { | |
jQuery: true, | |
console: true, |
OlderNewer