Class: Module

Inherits:
Object show all
Defined in:
lib/rails-helpers/top_level_rails_component.rb

Instance Method Summary collapse

Instance Method Details

#add_to_react_search_path(replace_search_path = nil) ⇒ Object



43
44
45
46
47
48
49
# File 'lib/rails-helpers/top_level_rails_component.rb', line 43

def add_to_react_search_path(replace_search_path = nil)
  if replace_search_path
    React::TopLevelRailsComponent.search_path = [self]
  elsif !React::TopLevelRailsComponent.search_path.include? self
    React::TopLevelRailsComponent.search_path << self
  end
end