Commit 90458024 authored by Tim Zallmann's avatar Tim Zallmann

Tabs HTML attributes merged

Fixed Linting error on ID setup
parent 837aa950
- tab_name = local_assigns.fetch(:name, nil)
- tab_class = local_assigns.fetch(:class, nil)
- qa_selector = local_assigns.fetch(:qa_selector, nil)
- tab_id = local_assigns.fetch(:id, nil)
- id = local_assigns.fetch(:id, nil)
- attrs = { class: [tab_class, ("active" if params[:tab] == tab_name)], data: { qa_selector: qa_selector } }
- attrs[:id] = id if id.present?
%li{ (tab_id ? { id: tab_id } : {}), class: [tab_class, ("active" if params[:tab] == tab_name)], data: { qa_selector: qa_selector } }
%li{ attrs }
= yield
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment