Interview questions/answers for an entry level Ruby developer.(Use these questions in conjunction with the 101 level Rails questions)
Q) How do you comment out a block of code?
A) Use =begin and =end.
=begin def my_commented_out_method end =end
You could use successive # signs, but that’s just tedious:## def my commented_out_method# end#
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Q) How do [...]
Archive for the ‘Interview Questions’ Category
Ruby Interview Questions – 101
Posted in Interview Questions, Ruby on November 20, 2007 | 1 Comment »
RubyOnRails Interview Questions – 201
Posted in Interview Questions, RubyOnRails on November 20, 2007 | Comments Off
These questions are intended to query for intermediate level knowledge of the Rails framework.
Q) I have two tables, users and addresses. The users table has a foreign key column to the addresses table called address_id. This is a one user to a one address setup. How do I represent that relationship in the User ActiveRecord [...]
RubyOnRails Interview Questions – 101
Posted in Interview Questions, RubyOnRails on November 20, 2007 | Comments Off
Interview questions/answers for an entry level RubyOnRails developer:
Q) What site contains the Rails framework documentation?
A) api.rubyonrails.com
Note: When I was starting to learn Rails, there was always a tab open for this site. This is a guess that other developers learning Rails would be utilizing this page as well.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Q) What does RAILS_ROOT represent?
A) The base directory [...]
