- http://derrickko.com, http://twitter.com/derrickko
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
gem "less", "~> 2.0.6" |
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
caches_action :index, :cache_path => Proc.new { | |
cache_key_for_relation(current_user.received_deliveries) | |
} | |
def cache_key_for_relation(relation, order_clause) | |
relation = relation.reorder(order_clause) | |
count = relation.count | |
if count > 0 | |
cache_key_for "#{relation.first.cache_key}-#{count}" |
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 ViewManager | |
containerId: "#mainContent" | |
constructor: -> | |
@container = $(@containerId) | |
@currentView = null | |
@modalView = null | |
Backbone.View::close = -> | |
@remove() | |
@unbind() |