[Answered ]-What is the difference in methodologies of returning data to the view between Rails and Django?

1đź‘Ť

âś…

If you’re looking for view models for rails you should look at Draper: https://github.com/drapergem/draper

It’s pretty easy to roll your own as well, there is nothing to stop you from only exposing one object to your Rails views.

1đź‘Ť

The Django trick that simulates Rails’s “automagic variables” is…

quizzes = Quiz.objects.all()
users = User.objects.all()
return render_to_response('about.html', locals())

Leave a comment