نشامى

وضع الدراسة · Ruby on Rails Mastery: A Full-Stack Development Proficiency Exam

بنك الأسئلة

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

ملخص الإنجاز0/25 · 0%

الأسئلة وإجاباتها

25 questionsBank.questionsCount
1

Which command is used to create a new Ruby on Rails application?

  • أrails.build
  • بruby newapp
  • تnew rails app
  • rails new app_name
2

What is the purpose of the Gemfile in a Rails application?

  • أDefine the database schema
  • Specify the Ruby gems needed for an application
  • تDescribe the application routes
  • ثConfigure application middleware
3

Which method is used to migrate changes to the database schema?

  • أrails schema rollback
  • بrails setup db
  • تdb:translate
  • rails db:migrate
4

What does the 'rake routes' command do in a Rails application?

  • أStarts the server with specified routes
  • Lists all the routes available in the application
  • تGenerates new routes
  • ثDeletes unused routes
5

How can you run a specific migration in Rails using the command line?

  • rails db:migrate:up VERSION=20210406000000
  • بrails migrate specific
  • تrake db:specific:run
  • ثrails run migration
6

Which callback method is used to execute code once a Rails model is fully loaded?

  • أafter_initialize
  • after_find
  • تafter_commit
  • ثafter_update
7

What command is used to destroy a model in a Rails application?

  • أrails remove model_name
  • بrails d model_name
  • تrails delete model
  • rails destroy model model_name
8

Which function aggregates values from a specified query in Rails?

  • أaverage
  • sum
  • تcount
  • ثmaximum
9

In a Rails application, what is the preferred way to handle database transactions?

  • أtransaction.begin
  • ActiveRecord::Base.transaction do
  • تbegin_transaction
  • ثRails.transaction.start
10

Which generator would you use to create a new controller in a Rails application?

  • rails generate controller
  • بrails generate newcontroller
  • تrails new controller
  • ثrails generate controller_name