There is always a degree of black magic when it comes to Rails and I can't find the documentation to help me figure out this one. What redirect_to does is clearly straight forward. In fact, this question isn't even directly related to, but an argument I see passed to redirect_to often and can't understand where that argument is coming from. For instance, if you scaffold a new object, let's say 'user', you'll see some code like this in user_controller.rb:
def destroy
@user = User.find(params[:id])
@user.destroy
respond_to do |format|
format.html { redirect_to(users_url) }
format.xml { head :ok }
end
end
Question is, what exactly is users_url here? Where does it come from? Can someone point me in the right direction in as far as documentation goes?