Correct Answer:
Skip_before_action :login_required, only: [:get_posts]
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
<%= render(template: 'shared/product', with: @products) %>
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
BlogPost.joins (:comments).where(comments: {created_at: @range})
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Route
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
User.where(last_name: 'Smith')
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Controller
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
An unsaved Tag instance
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
An instance of an ActiveRecord model will have attributes that match the columns in a corresponding database table.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
<=>
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
It filters out submitted form parameters that are not named :name or :sku to make forms more secure.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Csrf_meta_tags
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
It is a more powerful or destructive version of the method.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Haml
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Products
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Rails generate controller Products index
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
MemoryStore, FileStore, MemCacheStore, RedisCacheStore, and NullStore
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
<%= javascript_include_tag 'main' %>
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
App/assets
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
<% render 'view', layout: 'mobile' %>
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Create an embedded Ruby file (.html.erb) and surround the Ruby code with <%= %>.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Both are one-to-many associations but with has_many :through, the declaring model can associate through a third model.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
CoffeeOrder
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Create
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Concerns allow modularity and code reuse in models, controllers, and other classes.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Render partial: ‘shared/menu’, cached: true
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
If sent using the POST HTTP method, the URL would create a new product in the database.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Model.errors[:address] <<
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
<%= collection_select(:product, :product_id, Product.all, :id, :name) %>
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
My_model.errors[:field]
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Yes, any instance variables that are set in an action method on a controller can be accessed and displayed in a view.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Product.where(
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
GET, POST, PATCH, DELETE
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Match 'items', to 'items#update', via: [:put, :patch]
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
ActiveSupport::Concern
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
A method in a controller that is executed before the controller action method
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
The form_tag method typically expects a URL as its first argument, while the form_for method typically expects a model object.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Skip_before_action :get_feature
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
<%= render partial:
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
x = y when x == false, otherwise x remains unchanged
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Devise
OmniAuth
Authlogic
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
What is the CGI Library? (check any that apply)
Correct Answer:
CGI data processing routines
Part of the Ruby standard library
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
The send_data method has the following options? send_data(data, options = {})
Correct Answer:
All of the above
Note: This Question is unanswered, help us to find answer for this one
Which of these codes will print correct date?
format('Birthday: #{month}/#{day}/#{year}', day: 14, month: 11, year: 1994) format('Birthday: %d/%d/%d', 11, 14, 1994)
format('Birthday: %{month}/%{day}/%{year}', day: 14, month: 11, year: 1994) format('Birthday: %{month}/%{day}/%{year}', 11, 14, 1994)
Correct Answer:
2nd
3rd
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Which of these files are located by default in "config” directory? (check any that apply)
Correct Answer:
application.rb
environment.rb
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Which of these filters do no exist in Rails controller? (check any that apply)
Correct Answer:
skip_action_callback
skip_before_callback
skip_after_callback
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Which of these folders do not exist in folder “app” in Rails 5? (check any that apply)
Correct Answer:
vendor
services
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Which of these URL's will not be created by method resources :posts in routes.rb?
Correct Answer:
POST /posts/create
DELETE /posts/:id/delete
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Which of these statements about Ruby on Rails 5 are false?
Correct Answer:
Relation "has_one" is required by default
Terminal command "rails" replaced by "rake"
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Why would let() be used in rspec?
Correct Answer:
let() always invoked before initialization
Note: This Question is unanswered, help us to find answer for this one
What is the SQL equivalent of following code? user=User.take(3)
Correct Answer:
SELECT *from users limit 3
Note: This Question is unanswered, help us to find answer for this one
Which of the following code snippet can be used to include all javascript files?
Correct Answer:
<%= javascript_include_tag :defaults %>
Note: This Question is unanswered, help us to find answer for this one
Which of the following code snippet can be used to include all javascript files?
Correct Answer:
http_basic_authenticate_with
Note: This Question is unanswered, help us to find answer for this one
Which following command will you use in Updates Ruby in the latest version?
Correct Answer:
All of the above
Note: This Question is unanswered, help us to find answer for this one
While installing Ruby, why do you sometimes get a missing "psych” error?
Correct Answer:
It seems your Ruby installation is missing psych (for YAML output). To eliminate this warning, please install libyaml and reinstall your Ruby.
Note: This Question is unanswered, help us to find answer for this one
Which of the following code is correct about Creating links
Correct Answer:
<%= link_to “Button”, {:action => “action_name”, :id => product}, :confirm => “some text here” %>
Note: This Question is unanswered, help us to find answer for this one
What is the top-level model class added in Ruby on Rails 5?
Correct Answer:
ApplicationRecord
Note: This Question is unanswered, help us to find answer for this one
Which type of field is recommended for storing “enum" in Rails?
Correct Answer:
integer
Note: This Question is unanswered, help us to find answer for this one
Which of these servers is the default development server for Ruby on Rails 5?
Correct Answer:
Puma
Note: This Question is unanswered, help us to find answer for this one
Which of these model methods will be generated by this code? enum state: { blocked: 0, active: 1 }
Correct Answer:
Model.states
Note: This Question is unanswered, help us to find answer for this one
Which of these methods catch Exception in Rails controllers?
Correct Answer:
rescue_from
Note: This Question is unanswered, help us to find answer for this one
Which of these routes is not generated by “resource :user”?
Correct Answer:
GET /user/new
Note: This Question is unanswered, help us to find answer for this one
Which of the following open directly is correct about Open URI?
Correct Answer:
open('http://www.example.com') { | data | results = data.read }
Note: This Question is unanswered, help us to find answer for this one
Which of these codes will raise an exception? class Person def name 'Andrew' end end # 1. person = Person.new person .name # 2. person = Person.new person. name # 3. Person .new .name # 4. Person .name
Correct Answer:
None of these
Note: This Question is unanswered, help us to find answer for this one
Which of the following is the correct way to add a field in a signup that is not present in the User Model?
Correct Answer:
Use a nested attribute with the Devise Model.
Note: This Question is unanswered, help us to find answer for this one
Which of these expressions is equivalent to this code? a ||= "string"
Correct Answer:
a || a = "string"
Note: This Question is unanswered, help us to find answer for this one
Which of the following represents the inverse of a has_one association?
Correct Answer:
belongs_to
Note: This Question is unanswered, help us to find answer for this one
In order to use optimistic locking, the table needs to have a column called ___________ of type integer.
Correct Answer:
lock_version
Note: This Question is unanswered, help us to find answer for this one
Which character is used to declare a global variable?
Correct Answer:
$
Note: This Question is unanswered, help us to find answer for this one
Which notation is used to create class variables?
Correct Answer:
@@
Note: This Question is unanswered, help us to find answer for this one
render method does not accept ________________
Correct Answer:
language
Note: This Question is unanswered, help us to find answer for this one
Which method is used to render partial templates as part of a view?
Correct Answer:
render
Note: This Question is unanswered, help us to find answer for this one
Which of the following types of association is not supported by ActiveRecord?
Correct Answer:
many-to-one
Note: This Question is unanswered, help us to find answer for this one
Which helper should be used when your model has association with other models and they also need to be validated?
Correct Answer:
validates_associated
Note: This Question is unanswered, help us to find answer for this one
State whether True or False The find method will raise an ActiveRecord::RecordNotFound exception unless a matching record is found for all the supplied primary keys.
Correct Answer:
True
Note: This Question is unanswered, help us to find answer for this one
What is the difference between find() and find_by_id() method?
Correct Answer:
find() will raise an error in case record does not exist for a given primary key whereas find_by_id() will not raise an error and will return nil
Note: This Question is unanswered, help us to find answer for this one
How to disable protection of CSRF attacks for API requests?
Correct Answer:
protect_from_forgery with: :null_session
Note: This Question is unanswered, help us to find answer for this one
Which method is used in views to prevent CSRF attack?
Correct Answer:
csrf_meta_tag
Note: This Question is unanswered, help us to find answer for this one
Which of the following methods can be used inside a controller to prevent CSRF attack?
Correct Answer:
protect_from_forgery
Note: This Question is unanswered, help us to find answer for this one
What is the difference between Lambdas and procs?
Correct Answer:
Lambdas check the number of arguments passed and will return an error if you try to pass the wrong number while Procs set extra variables to nil
Note: This Question is unanswered, help us to find answer for this one
Which file contains the database credentials of an RoR application?
Correct Answer:
database.yml
Note: This Question is unanswered, help us to find answer for this one
Which of the following rake commands can be used to load a schema.rb file into the database?
Correct Answer:
rake:db:schema:load
Note: This Question is unanswered, help us to find answer for this one
Which file contains the Gem requirements of an RoR App?
Correct Answer:
config
Note: This Question is unanswered, help us to find answer for this one
Which of the following command is used to list all the routes of an RoR application?
Correct Answer:
rake routes
Note: This Question is unanswered, help us to find answer for this one
Which of the following is used to achieve multiple inheritance in Ruby?
Correct Answer:
mixin
Note: This Question is unanswered, help us to find answer for this one
Which declaration can be used to override the default layout conventions in your controllers?
Correct Answer:
layout
Note: This Question is unanswered, help us to find answer for this one
Which of the following loops is not supported by Ruby?
Correct Answer:
Unless
Note: This Question is unanswered, help us to find answer for this one
The belongs_to association supports following options?
A) :autosavename, :class_id
B) :primary_key, :validate, :optional
C) :conuter_cache, :inverse_of, :foreign_key
D) :dependent, :polymorphic, :touch
Correct Answer:
B, C & D
Note: This Question is unanswered, help us to find answer for this one
The has_one association supports following options?
Correct Answer:
E)C,D
Note: This Question is unanswered, help us to find answer for this one
Which of these options for “dependent” do not exist in Rails?
Correct Answer:
All of these options exist
Note: This Question is unanswered, help us to find answer for this one
How is it possible to create combined unique index for two fields?
Correct Answer:
add_index :project_users, [:user_id, :project_id], unique: true
Note: This Question is unanswered, help us to find answer for this one
How do you permit nester attributes in Rails controllers for such model? class User has_one :profile accepts_nested_attributes_for :profile end
Correct Answer:
params.require(:user).permit(:email, profile_attributes: [:id, :_destroy])
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
rxml,Files with Ruby code using the Builder library to generate XML
Note: This Question is unanswered, help us to find answer for this one
The following methods skip validations, and will save the object to the database regardless of its validity?
Correct Answer:
E)A,B,C
Note: This Question is unanswered, help us to find answer for this one
What is the difference between "has_many :through" and "has_and_belongs_to_many"?
Correct Answer:
You should use "has_and_belongs_to_many" if you need validations, callbacks or extra attributes on the join model
Note: This Question is unanswered, help us to find answer for this one
What is the purpose of using below code in filter_parameter_logging.rb? Rails.application.config.filter_parameters += [:password]
Correct Answer:
Hide "password" parameter in applications logs
Note: This Question is unanswered, help us to find answer for this one
A controller is a server-side _____ of Rails that responds to external requests from the web server to the application?
Correct Answer:
Component
Note: This Question is unanswered, help us to find answer for this one
In Ruby on Rails, an action is typically a basic ____ that describes how to respond to a specific external web-browser request?
Correct Answer:
Unit
Note: This Question is unanswered, help us to find answer for this one
Which of the following instances are variables in your functional tests? (check any that apply)
Correct Answer:
@controller - The controller processing the request
@request - The request object
@response - The response object
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
What are the Available callbacks? (check any that apply)
Correct Answer:
around_enqueue
after_enqueue
before_perform
around_perform
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Which of these is not a valid Bundler command?
Correct Answer:
bundle deps
Note: This Question is unanswered, help us to find answer for this one
What are the asset tag helpers available in Rails? (check any that apply)
Correct Answer:
auto_discovery_link_tag
stylesheet_link_tag
image_tag
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
The following methods trigger validations, and will save the object to the database only if the object is valid? (check any that apply)
Correct Answer:
create
create!
update
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Calls to the render method generally accept using the following options?
Correct Answer:
E)C,D
Note: This Question is unanswered, help us to find answer for this one
What is the lowest version of Ruby supported by Ruby on Rails 5?
Correct Answer:
Ruby 2.2.2
Note: This Question is unanswered, help us to find answer for this one
Which of the following statements is correct?
Correct Answer:
All of the above
Note: This Question is unanswered, help us to find answer for this one
Please select the True statements from the following:
Correct Answer:
ActiveRecord - Talks to the database system and creates Ruby objects modeled on the database tables
ActionController - Manipulates ActiveRecord objects, loads data into variables for use in ActionView templates and uses CGI library to process form data held in CGI variables
ActionView - Fills ERB templates with data processed by ActionController, then hands the resulting HTML to the Web server
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Which of the following types of callbacks are available in ROR?
Correct Answer:
D) B & C
Note: This Question is unanswered, help us to find answer for this one
What is the difference between jruby and ruby?
Correct Answer:
All of the above.
Note: This Question is unanswered, help us to find answer for this one
Which of these options is right to create default scope of model in Rails?
Correct Answer:
default_scope -> { order(:position) }
Note: This Question is unanswered, help us to find answer for this one
Which of these files determine Ruby version and gemset for RVM library?
Correct Answer:
.ruby-version, .ruby-gemset
Note: This Question is unanswered, help us to find answer for this one
Which of the following statements is true regarding the find_or_create method in Ruby on Rails?
Correct Answer:
It can find multiple arguments by using Model.find_or_create_by_name('name here'). It will first find the record and if it doesn't exist it will create it.
Note: This Question is unanswered, help us to find answer for this one
Which of the following protects "NOT NULL" fields against missing a user input?
Correct Answer:
validates_presence_of
Note: This Question is unanswered, help us to find answer for this one
Which of the following is not an advantage of using an integrated development environment (IDE) for Rails ,compared with using a simple text editor?
Correct Answer:
smaller memory footprint
Note: This Question is unanswered, help us to find answer for this one
How can the Heroku deprecation warning be removed from a Rails plugin that has been used?
Correct Answer:
ActiveSupport::Deprecation.silenced = true
Note: This Question is unanswered, help us to find answer for this one
What is TDD is rails3?
Correct Answer:
TDD directs focus on testing.
Note: This Question is unanswered, help us to find answer for this one
Which of these tools are for checking Ruby code styling?
Correct Answer:
Rubocop
Note: This Question is unanswered, help us to find answer for this one
The asset tag helpers do not verify the existence of the assets at the specified locations.
Correct Answer:
True
Note: This Question is unanswered, help us to find answer for this one
Which of the following validations are supported by models?
Correct Answer:
Presence validation
Note: This Question is unanswered, help us to find answer for this one
After executing the following code, what will the value of foo be? foo = 'bar' wom = Proc.new {|foo| foo = 'baz'} wom.call('pling')
Correct Answer:
"bar"
Note: This Question is unanswered, help us to find answer for this one
Which of the following will return a User object when used with a model which deals with a table named User?
Correct Answer:
User.new
Note: This Question is unanswered, help us to find answer for this one
Which of the following options will correctly show an image in the HTML ERB template in Rails?
Correct Answer:
<%= image_tag("logo.png", :alt=>"Sample Logo", :class=>"round" %>
Note: This Question is unanswered, help us to find answer for this one
Which of the following validations checks if a passed value is an enumeration and falls in the given range?
Correct Answer:
validates_inclusion_of
Note: This Question is unanswered, help us to find answer for this one
Which of the following will change a Rails 3 app to run in production mode?
Correct Answer:
rails s -e production
Note: This Question is unanswered, help us to find answer for this one
Given below are two statements regarding Rails testing: Statement X: Unit tests are used to test models. Statement Y: Functional tests are used to test controllers. Which of the following statements is true?
Correct Answer:
Both statements X and Y are correct.
Note: This Question is unanswered, help us to find answer for this one
During the deployment of the Rails application through Git, you want certain files to be ignored. Which of the following files performs that operation?
Correct Answer:
.gitignore
Note: This Question is unanswered, help us to find answer for this one
In a Rails application, a Gemfile needs to be modified to make use of sqlite3-ruby gems. Which of the following options will use these gems, as per the new Gemfile?
Correct Answer:
bundle install
Note: This Question is unanswered, help us to find answer for this one
Which of the following options will create a new Rails application with default templates?
Correct Answer:
rails new <application _name>
Note: This Question is unanswered, help us to find answer for this one
If we need to associate one model with many others, what associations should we use?
Correct Answer:
has_many, belongs_to
Note: This Question is unanswered, help us to find answer for this one
Which of the following options will create a many-to-many relation between the 'users' and the 'jobs' tables?
Correct Answer:
users_jobs
Note: This Question is unanswered, help us to find answer for this one
For the String class, when using #gsub! what are the potential return values?
Correct Answer:
nil or the string instance
Note: This Question is unanswered, help us to find answer for this one
What is the purpose of the model in an MVC architecture framework such as Ruby on Rails?
Correct Answer:
The model houses all the code that relates to data.
Note: This Question is unanswered, help us to find answer for this one
Which of the following statements regarding models in Ruby on Rails is correct?
Correct Answer:
The fetching of data from database is performed by models.
Note: This Question is unanswered, help us to find answer for this one
Which of the following actions is fired by default when a new controller is created?
Correct Answer:
index
Note: This Question is unanswered, help us to find answer for this one
Which of the following options is used to create a form HTML in the erb files?
Correct Answer:
form_for
Note: This Question is unanswered, help us to find answer for this one
The =~ operator is used to do inline Regular Expression matching, for instance:
"function" =~ /fun/
"function" =~ /dinosaurs/
What are possible return values for the =~ matcher?
Correct Answer:
nil, 0, and any positive integer
Note: This Question is unanswered, help us to find answer for this one
Which of the following options will disable the rendering of the view associated with a controller action?
Correct Answer:
render :layout=>false
Note: This Question is unanswered, help us to find answer for this one
What is the output of the following code?
$val = 20
print "Sample Text\n" if $val
Correct Answer:
Sample Text
Note: This Question is unanswered, help us to find answer for this one
If a model called BlogComment is defined, what would its DB table be blog_commentcalled?
Correct Answer:
blog_comments
Note: This Question is unanswered, help us to find answer for this one
Consider the following information for a User view:
user_path named route with value "/users/"
@user = 1
Now, consider the following code in the HTML erb template:
<%= link_to user_path(@user), "Angel" %>
What will be the HTML output of this code?
Correct Answer:
a href='/users/1'>Angel</a
Note: This Question is unanswered, help us to find answer for this one
There is a table named Product in a Rails application. The program is required to fetch any 5 rows where the productid is 2. Which of the following is the correct option to perform this action?
Correct Answer:
Product.find(:productid=>2), :limit=>5
Note: This Question is unanswered, help us to find answer for this one
What is the behavior of class variables with subclasses?
Correct Answer:
Class variables are shared between between all classes in the hierarchy.
Note: This Question is unanswered, help us to find answer for this one
Which of the following is true about writing tests for a Ruby on Rails application?
Correct Answer:
Rails semi-automates the process of writing tests. It starts by producing
skeleton test code in the background while models and controllers are
being written.
Note: This Question is unanswered, help us to find answer for this one
Rails automatically requires certain files in an application. Which of the following files are automatically included without an explicit 'require' being necessary?
Correct Answer:
All files in models, views, controllers, and any init.rb in plugins.
Note: This Question is unanswered, help us to find answer for this one
Which of the following controller actions (by default) are best suited to handle the GET HTTP request?
Correct Answer:
index
Note: This Question is unanswered, help us to find answer for this one
For the String class, what's the difference between "#slice" and "#slice!"?
Correct Answer:
"#slice" returns a new object, "#slice!" destructively updates — mutates — the object's value.
Note: This Question is unanswered, help us to find answer for this one
What is output of following statements?
1) "".nil? == "".empty? && "".blank? == "".empty?
2) !"".nil? == "".empty? && "".blank? == "".empty?
3) nil.nil? == nil.empty? && nil.blank? == nil.empty?
4) !"".blank? == "".present?
5) "".any? == !"".empty?
6) " ".blank? == " ".empty?
Correct Answer:
1) false 2) true 3) false 4) true 5) true 6) false
Note: This Question is unanswered, help us to find answer for this one
Using ERB for views, what filename should be given to a partial called 'login'?
Correct Answer:
_login.html.e
Note: This Question is unanswered, help us to find answer for this one
Which of the following validations in Rails checks for null fields?
Correct Answer:
validates_presence_of
Note: This Question is unanswered, help us to find answer for this one
What does the 4xx series of HTTP errors represent?
Correct Answer:
They are intended for cases in which the client seems to have encountered an error.
Note: This Question is unanswered, help us to find answer for this one
How can a partial called "cart" be rendered from a controller called "ProductsController", assuming the partial is in a directory called "shared"?
Correct Answer:
render :partial => 'shared/cart'
Note: This Question is unanswered, help us to find answer for this one
Which of the following correctly handles the currency field?
A) add_column :items, :price, :decimal, :precision => 8, :scale => 2
B) add_money :items, :price, currency: { present: false }
Correct Answer:
A
Note: This Question is unanswered, help us to find answer for this one
What is the convention for methods which end with a question mark?
e.g. #all?, #kind_of?, directory?
Correct Answer:
They should always return a boolean value.
Note: This Question is unanswered, help us to find answer for this one
In a Rails application, the developmental and production configuration are stored in the:
Correct Answer:
config/environments folder
Note: This Question is unanswered, help us to find answer for this one
Which of the following is not a built-in Rails caching strategy used to reduce database calls?
Correct Answer:
Object Caching
Note: This Question is unanswered, help us to find answer for this one
Select all incorrect statements regarding the Ruby Version Manager (RVM):
Correct Answer:
RVM provides a revision control tool to maintain current and historical
versions of files such as source code, web pages, and documentation.
Note: This Question is unanswered, help us to find answer for this one
When a new controller named "admin2" is created, the JS and the CSS files are created in:
Correct Answer:
assets
Note: This Question is unanswered, help us to find answer for this one
Which of the following is not true about log levels in Ruby on Rails?
Correct Answer:
The available log levels are: :debug, :info, :warn, :error, and :fatal,
corresponding to the log level numbers from 1 up to 5 respectively.
Note: This Question is unanswered, help us to find answer for this one
With the two models Hive and Bee; when creating a belongs_to association from the Bee model to Hive, what is the foreign key generated on Bee?
Correct Answer:
hive_id
Note: This Question is unanswered, help us to find answer for this one
What does REST stand for?
Correct Answer:
REpresentational State Transfer
Note: This Question is unanswered, help us to find answer for this one
Users who are new to MVC design often ask how to query data from Views. Is this possible? And if so, is this a good idea?
Correct Answer:
It is possible, but it is a bad idea because Views should only be
responsible for displaying objects passed to them.
Note: This Question is unanswered, help us to find answer for this one
What is the Singleton design pattern?
Correct Answer:
A class for which there is only ever one instance.
Note: This Question is unanswered, help us to find answer for this one
Which of the following statements is incorrect?
Correct Answer:
Rails does not support ODBC connectivity.
Note: This Question is unanswered, help us to find answer for this one
Which of the following serves as a structural skeleton for all HTML pages created?
Correct Answer:
application.html.erb
Note: This Question is unanswered, help us to find answer for this one
If a controller is named "Users", what would its helpers module be called?
Correct Answer:
UsersHelper
Note: This Question is unanswered, help us to find answer for this one
Consider the following code snippet:
def index
render
end
The corresponding index.html.erb view is as following:
<html>
<head>
<title>Ruby on Rails sample application | <%=@title%></title>
</head>
<body></body>
</html>
Which of the following options is correct?
Correct Answer:
The application will give an exception as @title variable is not defined in
the controller.
Note: This Question is unanswered, help us to find answer for this one
Which of the following commands will test a particular test case, given that the tests are contained in the file test/unit/demo_test.rb, and the particular test case is test_one?
Correct Answer:
$ ruby -Itest test/unit/demo_test.rb -a test_one
Note: This Question is unanswered, help us to find answer for this one
Which of the following will disable browser page caching in Rails?
Correct Answer:
expire_page(:controller => 'products', :action => 'index')
Note: This Question is unanswered, help us to find answer for this one
In a Rails Migration, which of the following will make a column unique, and then have it indexed?
Correct Answer:
add_index :table_name, :column_name, :unique => true
Note: This Question is unanswered, help us to find answer for this one
If a float is added to an integer, what is the class of the resulting number? i.e. 1.0 + 2
Correct Answer:
Float
Note: This Question is unanswered, help us to find answer for this one
In order to enable locking on a table, which of the following columns is added?
Correct Answer:
lock_version column
Note: This Question is unanswered, help us to find answer for this one
Which is the best way to add a page-specific JavaScript code in a Rails
3 app?
<%= f.radio_button :rating, 'positive', :onclick => "$('some_div').show();"
%>
Correct Answer:
None of these
Note: This Question is unanswered, help us to find answer for this one
Which of the following is the correct syntax for an input field of radio buttons in form_for?
Correct Answer:
<%= f.radio_button :contactmethod, 'sms' %>
Note: This Question is unanswered, help us to find answer for this one
Which of the following is the correct way to rollback a migration?
Correct Answer:
rake db:rollback STEP=N (N is the migration number to be rollbacked)
Note: This Question is unanswered, help us to find answer for this one
Which of the following methods is used to check whether an object is valid or invalid?
Correct Answer:
.valid? and .invalid?
Note: This Question is unanswered, help us to find answer for this one
What is the difference between :dependent => :destroy and :dependent => :delete_all in Rails?
Correct Answer:
In :destroy, associated objects are destroyed alongside the object by
calling their :destroy method, while in :delete_all, they are destroyed
immediately, without calling their :destroy method.
Note: This Question is unanswered, help us to find answer for this one
Suppose a model is created as follows:
rails generate model Sales
rake db:migrate
What would be the best way to completely undo these changes, assuming
nothing else has changed in the meantime?
Correct Answer:
rake db:rollback; rails destroy model Sales
Note: This Question is unanswered, help us to find answer for this one
What is the output of the following code?
puts "aeiou".sub(/[aeiou]/, '*')
Correct Answer:
*eiou
Note: This Question is unanswered, help us to find answer for this one
What declaration would you use to set the layout for a controller?
Correct Answer:
layout 'new_layout'
Note: This Question is unanswered, help us to find answer for this one
Which of the following options, when passed as arguments, skips a particular validation?
Correct Answer:
:validate => false
Note: This Question is unanswered, help us to find answer for this one
Which of the following is the default way that Rails seeds data for tests?
Correct Answer:
Fixtures
Note: This Question is unanswered, help us to find answer for this one
Which of the following is the correct way to skip ActiveRecords in Rails 3?
Correct Answer:
Add new line SKIP: ACTIVERECORD in config.generators.
Note: This Question is unanswered, help us to find answer for this one
Choose the best way to implement sessions in Rails 3:
A) Using CookieStore
B) By creating a session table and setting config/initializers/
session_store.rb with
Rails.application.config.session_store :active_record_store
C) By setting config/initializers/session_store.rb with
Rails.application.config.session_store :active_record_store only
Correct Answer:
B
Note: This Question is unanswered, help us to find answer for this one
Given below are two statements regarding the Ruby programming
language:
Statement X: "redo" restarts an iteration of the most internal loop, without
checking loop condition.
Statement Y: "retry" restarts the invocation of an iterator call. Also,
arguments to the iterator are re-evaluated.
Which of the following options is correct?
Correct Answer:
Statement X is incorrect, but statement Y is correct.
Note: This Question is unanswered, help us to find answer for this one
Which of the following commands will clear out sample users from the development database?
Correct Answer:
rake db:reset
Note: This Question is unanswered, help us to find answer for this one
Is an AJAX call synchronous or asynchronous?
Correct Answer:
Either; it is configurable
Note: This Question is unanswered, help us to find answer for this one
Which of the following assertions are used in testing views?
Correct Answer:
assert_select_email
Note: This Question is unanswered, help us to find answer for this one
What is green-threading?
Correct Answer:
When threads are emulated by a virtual machine or interpreter.
Note: This Question is unanswered, help us to find answer for this one
If a method #decoupage(n) is described as O(n^2), what does that mean?
Correct Answer:
The worst case run time is proportional to the size of the square of the method's input.
Note: This Question is unanswered, help us to find answer for this one
Which of the following replaced the Prototype JavaScript library in Ruby on Rails as the default JavaScript library?
Correct Answer:
jQuery
Note: This Question is unanswered, help us to find answer for this one
What component of Rails are tested with unit tests?
Correct Answer:
Models
Note: This Question is unanswered, help us to find answer for this one
What exception cannot be handled with the rescue_from method in the
application controller?
e.g
class ApplicationControllers < ActionController::Base
rescue_from Exception, with: error_handler
..........
end
Correct Answer:
All of these
Note: This Question is unanswered, help us to find answer for this one
Which gem is used to install a debugger in Rails 3?
Correct Answer:
gem "ruby-debug19"
Note: This Question is unanswered, help us to find answer for this one
What is the output of the following code in Ruby?
x= "A" + "B"
puts x
y= "C" << "D"
puts y
Correct Answer:
AB CD
Note: This Question is unanswered, help us to find answer for this one
Which of the following items are stored in the models subdirectory?
Correct Answer:
database classes
Note: This Question is unanswered, help us to find answer for this one
Which part of the MVC stack does ERB or HAML typically participate in?
Correct Answer:
View
Note: This Question is unanswered, help us to find answer for this one
Given the following code, where is the "party!" method available?
module PartyAnimal
def self.party!
puts "Hard! Better! Faster! Stronger!"
end
end
class Person
include PartyAnimal
end
Correct Answer:
PartyAnimal.party!
Note: This Question is unanswered, help us to find answer for this one
where we use attr_accessor and attr_accessible in rails ?
Correct Answer:
model
Note: This Question is unanswered, help us to find answer for this one
What is the recommended Rails way to iterate over records for display in a view?
Correct Answer:
Implicitly loop over a set of records, and send the partial being rendered a :collection.
Note: This Question is unanswered, help us to find answer for this one
What is best way to create primary key as a string field instead of integer in rails.
Correct Answer:
when creating a new table don't add primary key using this create_table
users, :id => false do |t| t.string :id, :null => false ...... end execute("ALTER
TABLE users ADD PRIMARY KEY (id)") if not using id as primary key then
in users model add the following line class User < ActiveRecord::Base
self.primary_key = "column_name" .... end
Note: This Question is unanswered, help us to find answer for this one
Which of the following is the correct way to know the Rails root directory path?
Correct Answer:
Rails.root
Note: This Question is unanswered, help us to find answer for this one
What is difference between "has_one" and "belong_to"?
Correct Answer:
"belong_to" should be used in a model whose table have foreign keys
while "has_one" is used with an associated table.
Note: This Question is unanswered, help us to find answer for this one
What is the output of the following Ruby code?
puts "The multiplication output of 10,10,2 is #{10*10*2}"
Correct Answer:
The multiplication output of 10,10,2 is 200.
Note: This Question is unanswered, help us to find answer for this one
Which of the following choices will write routes for the API versioning scenario described below?
/api/users returns a 301 to /api/v2/users
/api/v1/users returns a 200 of users index at version 1
/api/v3/users returns a 301 to /api/v2/users
/api/asdf/users returns a 301 to /api/v2/users
Correct Answer:
namespace :api do namespace :v1 do resources :users end
namespace :v2 do resources :users end match 'v:api/*path', :to =>
redirect("/api/v2/%{path}") match '*path', :to => redirect("/api/v2/%{path}")
end
Note: This Question is unanswered, help us to find answer for this one
Which of the following code samples will get the index of |page| inside of a loop?
Correct Answer:
<% @images.each_with_index do |page, index| %> <% end %>
Note: This Question is unanswered, help us to find answer for this one
What is the difference between _url and _path while being used in routes?
Correct Answer:
_url is absolute while _path is relative.
Note: This Question is unanswered, help us to find answer for this one
When using full-page caching, what happens when an incoming request matches a page in the cache?
Correct Answer:
Rails checks to see if there is a cached page on disk and passes it onto the server.
Note: This Question is unanswered, help us to find answer for this one
What is the output of the following code?
test*5
Correct Answer:
testtesttesttesttest
Note: This Question is unanswered, help us to find answer for this one
In a has_many association, what is the difference between build and new?
// user.rb
has_many :posts
// post.rb
belongs_to :user
Correct Answer:
'build' sets the foreign key and adds it to the collection.
Note: This Question is unanswered, help us to find answer for this one
Which of the following HTML template languages are supported by Ruby?
Correct Answer:
Embedded Ruby
Note: This Question is unanswered, help us to find answer for this one
Which of the following commands adds the data model info to the model file?
Correct Answer:
generate model
Note: This Question is unanswered, help us to find answer for this one
How can a value be stored so that it's shared across an entire request (i.e. make it accessible in controllers, views and models)?
Correct Answer:
Store it in a thread locally.
Note: This Question is unanswered, help us to find answer for this one
In the case of Rails application performance optimization, select all valid ways to do assets compilation:
Correct Answer:
All of these.
Note: This Question is unanswered, help us to find answer for this one
Which of the following options in the Ruby on Rails MVC architecture handles the dynamic data and the classes with the database?
Correct Answer:
Models
Note: This Question is unanswered, help us to find answer for this one
With an XHTML document, how can quirks mode be triggered in Internet Explorer?
Correct Answer:
Define a doc-type.
Note: This Question is unanswered, help us to find answer for this one
Which of the following are Rails specific assertions to the test/unit framework?
Correct Answer:
assert_no_difference
Note: This Question is unanswered, help us to find answer for this one
Which of the following options will find a row from the Users table having id = 1?
Correct Answer:
Users.find(1)
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
True
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Starts rails console
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
rails generate
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Navigate to our project folder, bundle install, rake db:create, rake db:migrate
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
rake -T or rake --tasks
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Object
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
require 'mygem'
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
a
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Model
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Yes
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
find_by will not throw the exception if post with an id=3 will not be found
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
0
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
false
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Sqlite, MySQL, PostgreSQL
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
It's the Rack configuration file, a module webserver interface
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Fat models, thin controllers and views
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
rake db:seed
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
<%= javascript_include_tag "javascript-file-name" %>
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Gemfile
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
rails s -p 3001
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
True
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
false
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
:unique
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
a Ruby on Rails method to create a Hash from an Array with keys computed by the block argument
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
false.class.superclass == Object
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
private
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
with Date.today you’ll have a system date
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
It provides an interface for protecting attributes from end-user assignment.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
belongs_to :parent_post, :class_name => 'Post'
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
1
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Enums
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
2 and 4
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
4
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
(1...5) === 5
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
1 //line break// 2
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Tomahawk
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
true
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
flash.now[:notice] = notice_message
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Jim Jim
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
In controller: flash.now[:error] = message
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Caching the counts of associations to avoid unnecessary Model.count queries
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
render js: "window.location = 'http://google.com'"
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
posts#create or posts#index
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
localhost:3000/assets/hello.js
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
a = 1 b = 2 c = 3
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
after_delete
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
has_many :blogs
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
h.delete_if { |k,v| k.nil? }
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
All of the above
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
It may be called by any instance of the defining class or its subclasses
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
render action: 'new', alert: 'The Post is incomplete or invalid.'
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
post
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
<%= text_field_tag
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
true
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
has_many
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
User
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
root :to =>
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
I18n.t('component.title')
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Resets all the cached information about columns.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
constant
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
<%= variable_name =>
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Append MD5 digest to filename at precompile
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
update
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
You cannot subclass a Module.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
None of them. All will return the sum.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
blob
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
= form_for User do |f|
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
nil
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
In controller: flash[:error] = message
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
has_and_belongs_to
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
shuffle
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
a\nb
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
SHOW for PUT
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Helpers are the functionality provided by the View for the modules to provide the help classes in MVC architecture.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Controllers
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
=begin COMMENT =end
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
controllers and views
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
false
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Mutable
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
@@
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Single Inheritance
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
add_key
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
class Bomber < Exception def initialize # Instance end end
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
<%= render :partial => 'partial_to_render', :collection => @collection %>
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
create_table :table_name
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
:
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
text_box
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
class variable
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Predefined data for populating the testing database
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
big_data.append("nine")
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
helper_function or view
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
remote: true
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
rails g controller Dog bark
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
def method_name() # method operations
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Models
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Models
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
insert
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
a
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
elseif
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
$ rails new example_app -T
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
COLORS.include?('red')
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
environments
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
resources :posts do resources :comments end
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
has
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
big_data.has_key?("icecream")
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
app/views/posts
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
remove_column :table_name, :column_name
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
rake assets:precompile
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
=!
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
<%= javascript_include_tag
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
true
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
symbols, belongs to the category of immutable
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
resources :people
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
config/routes.rb
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
True
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
while i < 100 do # DO THINGS i += 1 end
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
self.down
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
validates_form_of
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
class A def self.a end end
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
arr << item
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
[4]
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
_some_partial.html.erb
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
has_one :book
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
instance variable
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
jQuery
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
To determine if the variable is defined at the current scope
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
match '/person', :to => 'dog#show'
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
-VERSION
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
User.create(:name => 'david')
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
puts "Hello WORLD!"
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
yes
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
nil
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
db/seeds.rb
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
app/assets/javascripts
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
All of these are standard directories
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
.rb
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
ActiveRecord
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
foofoo
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
"#{monster}"
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
validates :name, :presence => true
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
modify a database by adding or removing columns or tables.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
rake db:migrate
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
nil
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
@
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
rake db:drop
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
rake db:create
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
gem install rails
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
models represent the data, views display the data, and controllers respond to user interactions
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
.erb
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Functionality in a package
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
sandbox
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
class variable
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
$ in Ruby is treated as a global variable
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
big_data.delete(1)
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
'rails new /path/to/new/app'
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
[1, 2, 3, 4, 5]
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
$
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
rake db:rollback STEP=5
Note: This Question is unanswered, help us to find answer for this one
Ruby On Rails MCQs | Topic-wise