How does namespacing work at lower levels with form_for in rails? -
my model 'posts' isn't namespaced.
my controller namespaced admin/posts_controller.rb , it's new method looks so:
class admin::postscontroller < applicationcontroller .....  def edit       @post = post.find( params[:id] )   end   why work:
<%= form_for [:admin, @post]  |f| %>   but not this:
<%= form_for @post  |f| %>   how form_for mapping @posts variable?
why autofill form text-areas when namespace there?
a valid @post variable being passed view in both cases.
 
 
  
Comments
Post a Comment