ruby - Why doesn't `posts_path` work in `rails console`? -


why link_to 'back', posts_path work in erb posts_path doesn't work in console?

$ rails console irb(main):005:0> posts_path nameerror: undefined local variable or method `posts_path' main:object 

you need add context of app in console.

app.posts_path app.get app.posts_path app.response app.response.body 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -

debian - 500 Error upon login into Plesk Admin - auth.php3? -