Logo Rails Bling
Logo Inverted Logo
  • Blog Setup
    • How I Go
    • How I Go Again
    • My Git Hooks
  • Clojure Thoughts
    • Clojourner in a Foreign Land
  • Decentralized Git
    • Give Up Github
    • Put the D in DVCS
  • Development Process
    • How to Agile
  • Local Development Setup
    • Upgrade to El Capitan
    • Upgrade to Catalina
    • Catalina Fresh Install
  • Ruby Thoughts
    • Fix Nokogiri Warning
  • RubyGems
    • Current List
    • Repair Old Gem (Part 1)
    • Repair Bundler (Part 2)
    • Upgrade RSpec (Part 3)
    • Upgrade Autotest (Part 4)
    • Rakefile & RuboCop LTS (Part 5)
Hero Image
Introducing dry_views

Enhancer of Rails’ content_for system. Allows defaults, and no_content_for overrides in partials. For Rails 3, 4. Why? Keep the views dry with content_for_with_default and friends! Complete flexibility in defining defaults and overrides. Remove most or all logic from views. Allow for no content to override a default. DryViews provides extensions to ActionView::Helpers::CaptureHelper, which is part of ActionPack: content_for_with_default no_content_for content_for (enhanced to play nice with the above methods) The rails rendering chain is sort of inside out so the template rendering happens first, and this is what makes it possible to override everything!

August 15, 2012 Read
Navigation
  • About
  • Skills
  • Experience
  • Projects
Contact me:
  • peter.boling a@t gmail.com
  • +1-925-252-5351

Toha Theme Logo Toha (tweaked by @pboling)
© 2024 Peter Boling
CC BY-SA 4.0
Powered by Hugo Logo