All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- The
env
argument of therender
block is now optional, as per standard Ruby block behavior.class WorksInThisVersion < Rack::Component render do 'This component raised an ArgumentError in old versions but works now.' end end class StillWorks < Rack::Component render do |env| 'This style still works. Using |keyword:, arguments:| in env is nice.' end end
- A changelog
- Templating via tilt, with support for escaping HTML by default
-
Calling
Component.memoized(env)
is no longer supported. Use Sam Saffron's lru_redux as an almost drop-in replacement, like this:require 'rack/component' require 'lru_redux' class MyComponent < Rack::Component Cache = LruRedux::ThreadSafeCache.new(100) render do |env| Cache.getset(env) { 'this block will render after checking the cache' } end end
#h
method for escaping HTML inside interpolated strings
- First public, documented release