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
class Api::UploadsController < ApiController | |
def create | |
@upload = Upload.new(upload_params) | |
ensure | |
clean_tempfile | |
end | |
private |
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
/** | |
* Writes an image into a canvas taking into | |
* account the backing store pixel ratio and | |
* the device pixel ratio. | |
* | |
* @author Paul Lewis | |
* @param {Object} opts The params for drawing an image to the canvas | |
*/ | |
function drawImage (opts) | |
{ |
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
# Rails 2 | |
# config/initializers/date_formats.rb | |
ActiveSupport::CoreExtensions::Time::Conversions::DATE_FORMATS.merge!( | |
:date => '%m/%d/%Y', | |
:date_time12 => "%m/%d/%Y %I:%M%p", | |
:date_time24 => "%m/%d/%Y %H:%M" | |
) | |
# Rails 3 | |
# config/initializers/date_formats.rb |