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
define [ | |
'jquery' | |
'underscore' | |
'backbone' | |
'models/session' | |
'text!templates/sessions/new.html' | |
], ($, _, Backbone, Session, template) -> | |
SessionsNewView = Backbone.View.extend | |
template: _.template(template) |
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
# Main reference was lascarides' post at http://stackoverflow.com/questions/14743447/getting-pdf-from-wickedpdf-for-attachment-via-carrierwave | |
# estimate.rb | |
# ... | |
has_attached_file :pdf, | |
storage: :s3, | |
s3_credentials: { | |
access_key_id: ENV['AWS_ACCESS_KEY_ID'], | |
secret_access_key: ENV['AWS_SECRET_ACCESS_KEY'], | |
bucket: ENV['AWS_BUCKET'] |
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 BaseCollection extends Backbone.Collection | |
initialize: () -> | |
@_hash_keys = {} | |
# @hashOn 'last_name', false | |
# Start hashing on passed in attribute or method on the model that returns a string | |
# unique indicates whether or not mulitple models in the collection have the same value for this attribute | |
# If unique is true, we'll keep track of all models with the same value instead of overwriting in the store | |
hashOn: (key, unique) -> |