codeplant / simple-navigation

A ruby gem for creating navigations (with multiple levels) for your Rails, Sinatra or Padrino applications. Render your navigation as html list, link list or breadcrumbs.
http://simple-navigation-demo.codeplant.ch/
MIT License
885 stars 136 forks source link

Fix uninitialized variable `@dom_attributes` warning #218

Closed johantell closed 5 years ago

johantell commented 5 years ago

Background: The line

(@dom_attributes || {}).merge(dom_id_and_class)

in ItemContainer printed warnings for usage of unitialized instance variable.

simple-navigation/lib/simple_navigation/item_container.rb:27: warning: instance variable @dom_attributes not initialized

This change will simply fix the issue and remove the warning

Changes:

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.0002%) to 99.616% when pulling 9195cb065a5ff33e312f57428ca6e10d9c870316 on johantell:fix_warning into abadde3e7a5f2ac438c7d874c399f57137169712 on codeplant:master.

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.0002%) to 99.616% when pulling 9195cb065a5ff33e312f57428ca6e10d9c870316 on johantell:fix_warning into abadde3e7a5f2ac438c7d874c399f57137169712 on codeplant:master.

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.0002%) to 99.616% when pulling 9195cb065a5ff33e312f57428ca6e10d9c870316 on johantell:fix_warning into abadde3e7a5f2ac438c7d874c399f57137169712 on codeplant:master.