ruby - Rails 4.1.5 Engine's Routes Not Showing Up In Rake Routes — Believe It's Naming Convention -
so working on trying add together rails 4.1.5 engine/plugin our project loaded rails. running rake routes
shows other engines have modeled code after believe may running issues rails naming conventions not familiar with. purpose of i've created engine using next command:
rails plugin new modules/admin/new_functions --skip-bundle --full
this created skeleton engine. ensured used plural name engine per this piece of rails documentation. controller is:
module admin class newfunctionscontroller < admincontroller def index end def create end end end
my config/routes.rb
file follows. i'm unsure if resources :new_functions correctly maps controller have i'm not sure right form be.
rails.application.routes.draw namespace :admin resources :new_functions end end
the directory construction is:
new_functions |-- app |-- assets |-- javascripts |-- admin |-- new_functions |-- supporting javascript files |-- controllers |-- new_functions_controller.rb |-- views |-- admin |-- new_functions |-- supporting html/erb files |-- config |-- routes.rb |-- lib |-- new_functions.rb |-- new_functions |-- engine.rb |-- version.rb |-- test |-- new_functions_test.rb |-- test_helper.rb |-- gemfile |-- gemfile.lock |-- rakefile |-- new_functions.gemspec
would appreciate advice may have regarding identifying issue , fixing it. steps or reading can find issue helpful.
thank time.
after farther research seems though had added "spring" application, caches rake routes
. stopping spring bin/spring stop
, running rake routes
fixed issue routes not appearing.
ruby-on-rails ruby ruby-on-rails-4 rails-engines
No comments:
Post a Comment