Cannot see Routes when mounting Rails 3 Engine -


i have created rails engine (as per rails guides) using:

rails plugin new address_book --full --mountable 

i proceeded create controller engine called pages single action (called temp) display single view, namely app/views/address_book/pages/temp.html.erb

the engine's config/routes.rb is:

addressbook::engine.routes.draw   match :temp, to: "pages#temp"  end 

in parent application added following in it's routes.rb file:

mount addressbook::engine => "/address_book", as: "address_book" 

in action of 1 of parent application's controllers have following call view belonging engine:

redirect_to address_book.temp_path 

now, though rake routes displays engine's path, when try execute action browser keep getting error:

undefined local variable or method `address_book' 

for line redirect_to address_book.temp_path

the result of rake routes contains following:

address_book        /address_book         addressbook::engine  routes addressbook::engine: temp  /temp(.:format) address_book/pages#temp 

i cannot seem understand i'm missing, appreciated.

after long process of trial , error (and shutting down pc night) realised needed restart server

hope post others same stumbling block.


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -