πŸ§ͺ Ruby on Rails MCQ Quiz Hub

Ruby on Rails Multiple choice Questions Set 1

Choose a topic to test your knowledge and improve your Ruby on Rails skills

1. What is bundler?




2. What is gemset?




3. What is gem?




4. what is scaffold command?




5. What is rake?




6. how do you create a migration that adds a "phone" field to the "tickets" table?




7. What is rvm?




8. Rails' application framework is called ----------?




9. how do you run a migration?




10. what does "show" refer to as the :action value?




11. how do you update?




12. what comes after <% form_for()... ?




13. what kind of tests are there?




14. how do you specify a format like html or xml in routes.rb?




15. when you put something into an array, does the array keep a separate copy?




16. what is scriptlet versus expression




17. what does the "h" in <%=h ... %> mean?




18. .what's the difference between model names and controller names?




19. what is "migration"?




20. what steps get you from fild.erb to file.html?




21. what is the filter code that calls on the "check_logged_in" method for only the "edit" and "update" methods?




22. representation of a resource is called -------------.




23. converts database records to objects is called -------------.




24. what checks if an input is numeric?




25. what is Rails' object-relational mapping library?




26. what is Rails' object-relational mapping library?




27. where do you add the filter code?




28. why is it good to redirect after inserting info into the database?




29. which two steps to include test.xml data to the partial "map" (via the variable "data")...?




30. what environments does Rails have by default?




31. how do you generate regular model code (not scaffolding)?




32. how should you order routes?




33. what should you write in routes.rb to give meaning to http://mebay.com/ads/3?




34. to add login security, which two pieces of code do you need?




35. how do partials look compared to regular erb files?




36. how does "rake" differ from "ruby"?




37. .why should partials generally use local variables?




38. do models have singular or plural names?




39. how does rake tell which migrations have been run and which have not?




40. how does Rails choose to correct format to generate?




41. how do you express error messages in a form (do |f|)?




42. .what are the three "magic columns"




43. what tag starts a form?




44. what is params[...]?




45. what comes after "def check_logged_in" line for site "ads"?




46. what is naming convention for classes?




47. to create scafolding for "thing" data, run...




48. what variable changes the environment?




49. what is naming convention for file names ?




50. why do you only need to call "render" in the controller sometimes and not always?




51. a RESTful application uses ... to define an interaction with the data.




52. what generates web pages from page templates?




53. where do you edit routs?




54. .if looping through β€œf” object, how do you make a text field β€œname”?




55. what does a model object do before it saves or updates data?




56. .what does "rake" mean?




57. .how do you start a loop that reads through the array object "@ads"?




58. what scripts does the model-generator command create?




59. what does Embedded Ruby (ERb) process as inputs?




60. what kind of test do you create yourself?




61. what is "format" in "repond_to do |format|"?




62. Ruby on Rails Multiple choice Questions




63. what parameters are in <% form_for() %>?




64. how do you add an error (called "there was an error") in the validate method?




65. how do you call a partial?




66. how do you run the latest migrations?




67. what's special about a search form?




68. what expression do all layouts have?




69. if the table Seats is associated with the table Flights, how should you name the table column in Seats to indicate its flight?




70. how would you insert "1 + 1" into a string?




71. what is the second uri indicate?




72. what precedes the "check_logged_in" method in a class?




73. what method name indicates to rails that it should validate before saving/updating?




74. how do you ask for all records of the Ads table?




75. .when data is retrieved from the database, what does Rails turn it into?