📜 questionsBank.title ⁉️

Ruby on Rails Mastery: A Full-Stack Development Proficiency Exam

questionsBank.legalText

💡 questionsBank.answeredQuestions

1.Which command is used to create a new Ruby on Rails application?
  • 1.rails.build
  • 2.ruby newapp
  • 3.new rails app
  • 4.rails new app_name
2.What is the purpose of the Gemfile in a Rails application?
  • 1.Define the database schema
  • 2.Specify the Ruby gems needed for an application
  • 3.Describe the application routes
  • 4.Configure application middleware
3.Which method is used to migrate changes to the database schema?
  • 1.rails schema rollback
  • 2.rails setup db
  • 3.db:translate
  • 4.rails db:migrate
4.What does the 'rake routes' command do in a Rails application?
  • 1.Starts the server with specified routes
  • 2.Lists all the routes available in the application
  • 3.Generates new routes
  • 4.Deletes unused routes
5.How can you run a specific migration in Rails using the command line?
  • 1.rails db:migrate:up VERSION=20210406000000
  • 2.rails migrate specific
  • 3.rake db:specific:run
  • 4.rails run migration
6.Which callback method is used to execute code once a Rails model is fully loaded?
  • 1.after_initialize
  • 2.after_find
  • 3.after_commit
  • 4.after_update
7.What command is used to destroy a model in a Rails application?
  • 1.rails remove model_name
  • 2.rails d model_name
  • 3.rails delete model
  • 4.rails destroy model model_name
8.Which function aggregates values from a specified query in Rails?
  • 1.average
  • 2.sum
  • 3.count
  • 4.maximum
9.In a Rails application, what is the preferred way to handle database transactions?
  • 1.transaction.begin
  • 2.ActiveRecord::Base.transaction do
  • 3.begin_transaction
  • 4.Rails.transaction.start
10.Which generator would you use to create a new controller in a Rails application?
  • 1.rails generate controller
  • 2.rails generate newcontroller
  • 3.rails new controller
  • 4.rails generate controller_name
questionsBank.page 1 questionsBank.of 3