class Views::Base < Fortitude::Widget # You can configure the behavior of Fortitude in this file. # # Don't be afraid -- by default you can simply ignore this file, and probably everything will # work exactly as you'd expect. Come back to it if you want to tweak Fortitude's behavior or # read about some of its more interesting features. # # # Fortitude configuration options apply to the class they're invoked on, and all subclasses. # By convention, app/views/base.rb holds Views::Base, which is used as the superclass of all # Fortitude widgets in a Rails application -- thus, configuration set here will apply to all # Fortitude widgets. However, you can create any subclasses of this class you want, and set # different configuration there, which will apply to all subclasses of those widgets. # (For example, you could create app/views/admin/base.rb containing # Views::Admin::Base < Views::Base, and set configuration there that would only apply to any # widget inheriting from Views::Admin::Base). The only exception is `doctype`, which cannot # be set on the descendant of any class that's set it itself. # # Below are all the current Fortitude configuration options, as of the creation of this file. # This controls the set of tags available to you (and the nesting and attributes they allow, # if you enable enforce_element_nesting_rules or enforce_attribute_rules). It also controls # what the `doctype!` method outputs, and related behavior (such as how self-closing elements # like
render). # # You can choose from :html5, :html4_transitional, :html4_strict, :html4_frameset, # :xhtml11, :xhtml10_transitional, :xhtml10_strict, and :xhtml10_frameset. doctype :html5 # format_output: default true in development mode, false otherwise # # format_output causes the output of "pretty-printed" HTML, beautifully nested and easy for # humans to read. If set to false, HTML is produced with as little whitespace as possible # while preserving meaning -- better for production, where minimizing size of generated HTML # is more important. # format_output (!! Rails.env.development?) # start_and_end_comments: default true in development mode, false otherwise # # start_and_end_comments causes comments to be written into the HTML at the start and end # of every widget rendered, showing the class name of the widget, its nesting depth, and # all the arguments passed to that widget. This makes it vastly easier to look at the HTML # generated for an entire page and know exactly which view file to go change in order to # change that HTML. # start_and_end_comments (!! Rails.env.development?) # debug: default true in development mode, false otherwise # # debug alerts you when a rare, but extremely-difficult-to-debug, situation arises. # Fortitude prioritizes parameters declared using 'need' above its built-in HTML tags. # As an example, if you pass a parameter called `time` to your view by saying # `needs :time`, then the method `time` in your widget will return the value of that # attribute, rather than (as it otherwise would) rendering the HTML5 `