6 archived: This sheet may describe practices that might be outdated.
11 in config/environments/development.rb:
13 # Source maps for Sass
14 config.sass.debug_info = true
15 config.sass.line_comments = false
18 config.assets.debug = false
22 <%= render 'article', full: true %>
23 <%= render 'article' %>
25 <% if local_assigns[:full] %>
32 read_more_html: "read <b>more</b>..."
34 ### Exception handling
36 # config/application.rb
37 config.exceptions_app = self.routes
39 get '/404', to: 'errors#not_found'
40 get '/500', to: 'errors#server_error'
42 class ErrorsController
44 render status: :not_found
54 Article.distinct.pluck('author')
58 scope :with_drafts, -> {
59 uniq.joins(:articles).merge(Article.draft)
64 scope :recent, -> { order created_at: :desc }
68 .group("to_char(created_at, 'YYYY-MM')")
69 .group("to_char(created_at, 'YYYY-MM')").count