Configure Layout Using Multiple Template Layouts Optional Content Layouts are special views, that render the “fixed” part of the HTML markup. This is the part that doesn’t cha...
Setup Other web servers Assets helpers Javascripts Stylesheets Favicon Image Audio Video Asset path Asset URL Demo project A web page may link to external resources s...
Compressors JavaScript Stylesheet Custom Compressors Compressors Assets compression (aka minification) is a process to shrink the file size of a file in order to reduce the ...
Default mode Strict mode We can take data integrity a step further: we can optionally define our own entity internal schema. Custom schema is optional for SQL databases, whi...
Usage Precision Delimiter Separator Hanami offers a helpful way to present numbers via #format_number , a private method available only in views. Usage module Web m...
Prepare Prepare In our settings (apps/web/application.rb ), there is a code block that allows to share the code for all the views of our application. When a view includes the ...
For complex use cases we may want to pass data to views in order to present it to our users. Hanami puts emphasis on explicitness: data isn’t shared between the controller action...
Logic Operators Context Of Execution Predicates Array Emptiness Equality Exclusion Format Greater Than Greater Than Equal Inclusion Less Than Less Than Equal Filled M...