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



68
69
70
71
72
73
74
# File 'lib/rails-helpers/top_level_rails_component.rb', line 68

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