Login
Remember
Register
Ask a Question
Recent questions tagged ruby-on-rail
0
votes
1
answer
If a product has a user-uploadable photo, which ActiveStorage method should fill in the blank? class Product << ApplicationRecord ____ :photo end
asked
Sep 3, 2022
in
Ruby
by
DavidAnderson
ruby-on-rail
0
votes
1
answer
In Rails, what caching stores can be used?
asked
Sep 2, 2022
in
JavaScript
by
DavidAnderson
ruby-on-rail
+1
vote
1
answer
A Rails project has ActiveRecord classes defined for Classroom and Student. If instances of these classes are related so that students are assigned the ID of one particular classroom
asked
Aug 26, 2022
in
Ruby
by
Robin
ruby-on-rail
0
votes
1
answer
Given this controller code, which choice describes the expected behavior if parameters are submitted to the update action that includes values for the product's name, style, color, and price?
asked
Aug 26, 2022
in
Ruby
by
Robin
ruby-on-rail
0
votes
1
answer
How would you render a view using a different layout in an ERB HTML view?
asked
Aug 26, 2022
in
Ruby
by
Robin
ruby-on-rail
0
votes
1
answer
How do you add Ruby code inside Rails views and have its result outputted in the HTML file?
asked
Aug 26, 2022
in
Ruby
by
Robin
ruby-on-rail
0
votes
1
answer
In ActiveRecord, what is the difference between the has_many and has_many :through associations?
asked
Aug 26, 2022
in
Ruby
by
Robin
ruby-on-rail
0
votes
1
answer
You are using an existing database that has a table named coffee_orders. What would the ActiveRecord model be named in order to use that table?
asked
Aug 26, 2022
in
Ruby
by
Robin
ruby-on-rail
0
votes
1
answer
When using an ActiveRecord model, which method will create the model instance in memory and save it to the database?
asked
Aug 26, 2022
in
Ruby
by
Robin
ruby-on-rail
0
votes
1
answer
What is the reason for using Concerns in Rails?
asked
Aug 26, 2022
in
Ruby
by
Robin
ruby-on-rail
0
votes
1
answer
In Rails, how would you cache a partial template that is rendered?
asked
Aug 26, 2022
in
Ruby
by
Robin
ruby-on-rail
0
votes
1
answer
Given this code, which choice would be expected to be a true statement if the user requests the index action?
asked
Aug 26, 2022
in
Ruby
by
Robin
ruby-on-rail
0
votes
1
answer
For a Rails validator, how would you define an error message for the model attribute address with the message "This address is invalid"?
asked
Aug 26, 2022
in
Ruby
by
Robin
ruby-on-rail
0
votes
1
answer
How would you generate a drop-down menu that allows the user to select from a collection of product names?
asked
Aug 26, 2022
in
Ruby
by
Robin
ruby-on-rail
0
votes
1
answer
If a database table of users contains the following rows, and id is the primary key, which statement would return only an object whose last_name is "Cordero"?
asked
Aug 26, 2022
in
Ruby
by
Robin
ruby-on-rail
0
votes
1
answer
When a validation of a field in a Rails model fails, where are the messages for validation errors stored?
asked
Aug 26, 2022
in
Ruby
by
Robin
ruby-on-rail
0
votes
1
answer
Are instance variables set within a controller method accessible within a view?
asked
Aug 26, 2022
in
Ruby
by
Robin
ruby-on-rail
0
votes
1
answer
Given this code, which statement about the database table "documents" could be expected to be true?
asked
Aug 26, 2022
in
Ruby
by
Robin
ruby-on-rail
0
votes
1
answer
Which ActiveRecord query prevents SQL injection?
asked
Aug 26, 2022
in
Ruby
by
Robin
ruby-on-rail
0
votes
1
answer
Which choice includes standard REST HTTP verbs?
asked
Aug 26, 2022
in
Ruby
by
Robin
ruby-on-rail
Page:
1
2
next »
...