How to write path redirect in ruby on rails and angularjs -
sorry new ruby on rails.
i trying create directive in angularjs. doing create html file in folder view/forms, named topright-buttongroup.html
then created simple directive test:
app.directive('toprightbuttontools', function(){ return { restrict: 'c', templateurl: 'topright-buttongroup.html' }; });
but getting error message in console is:
get http://localhost:3000/forms/topright-buttongroup.html 404 (not found)
am missing should done on ruby on rails? or should write redirect code , save in somewhere?
my full folder structure is:
if need form accessible so, create folder inside public/ forms/ , have file placed there. content inside public dir rendered directly.
unlike core php or other such scripting languages, ror requires controllers render actions arent merely files interpreted. also, routes defined in config/routes.rb.
refer:
http://guides.rubyonrails.org/routing.html
http://www.xyzpub.com/en/ruby-on-rails/3.2/statische_webseiten.html
Comments
Post a Comment