Module: Adva::Categories::Paths
- Defined in:
- lib/testing/paths.rb
Instance Method Summary collapse
Instance Method Details
#path_to(page) ⇒ Object
2 3 4 5 6 7 8 9 10 11 |
# File 'lib/testing/paths.rb', line 2 def path_to(page) case page when /^the admin "([^"]*)" section categories page$/ site = Site.first section = Section.where(:name => $1).first || raise("could not find section named #{$1}") polymorphic_path([:admin, site, section, :categories]) else super end end |