Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialChristopher Phillips
10,061 PointsQuotation convention
I find myself primarily using double quotes instead of single quotes in areas such as:
post "/pages", to: "pages#create"
I do this because I'm used to enclosing classes in HTML with double quotes as well. It just seems straight forward forme to stick to this method. But Jay is using single quotes on the above example.
Is there a specific standard within Ruby/Rails I should be aware of? I don't want to apply for jobs and have someone site my noob status because I'm using double where single is norm.
1 Answer
Jay McGavren
Treehouse TeacherThere really isn't one Ruby-wide standard. As long as you're consistent within a project, you'll be fine. See also https://github.com/rubocop-hq/ruby-style-guide#consistent-string-literals .