module ActiveScaffold module Helpers # All extra helpers that should be included in the View. # Also a dumping ground for uncategorized helpers. module ViewHelpers NESTED_PARAMS = [:eid, :association, :parent_scaffold] include ActiveScaffold::Helpers::IdHelpers include ActiveScaffold::Helpers::AssociationHelpers include ActiveScaffold::Helpers::PaginationHelpers include ActiveScaffold::Helpers::ListColumnHelpers include ActiveScaffold::Helpers::ShowColumnHelpers include ActiveScaffold::Helpers::FormColumnHelpers include ActiveScaffold::Helpers::SearchColumnHelpers include ActiveScaffold::Helpers::HumanConditionHelpers ## ## Delegates ## # access to the configuration variable def active_scaffold_config controller.class.active_scaffold_config end def active_scaffold_config_for(*args) controller.class.active_scaffold_config_for(*args) end def active_scaffold_controller_for(*args) controller.class.active_scaffold_controller_for(*args) end ## ## Uncategorized ## def controller_path_for_activerecord(klass) controller = active_scaffold_controller_for(klass) controller.controller_path rescue ActiveScaffold::ControllerNotFound nil end # This is the template finder logic, keep it updated with however we find stuff in rails # currently this very similar to the logic in ActionBase::Base.render for options file def template_exists?(template_name, partial = false) lookup_context.exists? template_name, '', partial end # Turns [[label, value]] into