What's great about Rails is two things. First, ActionRecord, which wraps the database and the relationships between database tables in objects.
To take the classic example of an e-commerce web site... You could list all the items a user has ordered with this code:
Code:
@user = current_user
@user.orders.each do |order|
order.items.each do |item|
puts "#{item.name}<br>\n";
end
end
Rails does all the data querying in the background. It's pretty magical, for those of us who have spent the last however many years hacking our chosen language (PHP and Perl in my case) to write valid SQL.
The second thing that's great about Rails is all the helper and support methods they provide. Imagine getting a date object with tomorrow's date in it from the code "1.day.from_now"! Amazing!