Module: InlineForms::Tabs
- Defined in:
- lib/inline_forms/tabs.rb
Overview
Vendored replacement for the tabs_on_rails gem (8.1.23).
inline_forms used tabs_on_rails 3.0.0 (MIT, Copyright (c) 2009-2017
Simone Carletti weppos@weppos.net; last released 2017) for exactly four
things: the controller set_tab DSL, the current_tab/current_tab?
helpers, the tabs_tag view helper, and the TabsBuilder base class that
InlineForms::TurboTabsBuilder subclasses. This file ports that surface —
API-compatible with the gem — so generated apps no longer need an
unmaintained dependency (which was also an undeclared one: the engine
required "tabs_on_rails" but the gemspec never listed it; only the
installer-written Gemfile made it load).
The port keeps upstream semantics:
class OwnersController < ApplicationController
set_tab :owner # class-level, uses before_action
set_tab :naw, :subtabs, only: :show
end
<%= tabs_tag builder: InlineForms::TurboTabsBuilder do |tab| %>
<%= tab.naw "NAW", owner_path(@object, tab: :naw) %>
<% end %>
If the host app still bundles the tabs_on_rails gem (apps generated before 8.1.23), the engine skips its own controller include and leaves the gem's identical implementation in charge — see the engine initializer in lib/inline_forms.rb.
Defined Under Namespace
Modules: Controller Classes: Builder, Renderer, TabsBuilder