Skip to content

Instantly share code, notes, and snippets.

View fedorkk's full-sized avatar

Fedor Koshel fedorkk

  • Handshake Europe Gmbh
  • Berlin
View GitHub Profile
@longlostnick
longlostnick / uploads_controller.rb
Created June 17, 2014 18:20
Rails JSON file upload with carrierwave (from base64 string)
class Api::UploadsController < ApiController
def create
@upload = Upload.new(upload_params)
ensure
clean_tempfile
end
private
@michaelminter
michaelminter / notes.md
Created November 14, 2012 18:05
FIXME, TODO, and OPTIMIZE code comments

You can add some special notes to your source code comments in Rails to remind you later of stuff you need to do:

class Article < ActiveRecord::Base
  # TODO add named_scopes
  # FIXME method A is broken
  # OPTIMIZE improve the code 

  has_many :comments
  ....

end