1. What command do you run to undo the last 5 migrations
2. A global variable has a name beginning with:
3. What gets returned by: [1, [2, 3,[4, 5]]].flatten
4. How can you create a new Rails project?
5. Which will delete the key-value 1 from array: 'big_data'?
6. What is the use of $ in Ruby?
7. What is the use of @@ in Ruby?
8. Which is NOT a default Rails environment?
9. What is a Gem?
10. Which extension is default for views html templates?
11. In the MVC pattern:
12. What is the command to install Rails?
13. What command do you run to create your database?
14. What command do you run to drop your database?
15. How would you declare an Instance Variable?
16. Ruby uses:
17. What command do you run to update your database?
18. Migrations...
19. What is the preferred method of validating that the name has been set?
20. Which will interpolate within a string with the variable named 'monster'?
21. What is the output of the following ? s='foo' * 2 puts s
22. What ORM does Ruby on Rails use by default?
23. What is a typical file extension found in the app/controllers directory
24. Which of these is not a standard directory in a Rails application?
25. The recommended directory in which to place your app's javascript files is:
26. Which files is used to specify any default data that should be loaded into the application's database, when it is first setup?
27. What is the default value for a global variable (before initialization)?
28. is it possible to change the default port when running a rails server ?
29. Which prints the 'Hello WORLD!' output with a new line?
30. How do you create a new user object with the name david and save it to the database?
31. Which of these does NOT correctly return the version of Ruby?
32. If you want the /person url to map to your dog controller and show method, what do you add to your routes?
33. What is the use of the 'defined?' method?
34. Which of these javascript frameworks became the default with the release of Rails 3.1?
35. What is the use of @ in Ruby?
36. Imagine that you have two models: 'User' and 'Book', and a user can have only one book. How should the association look like in the 'User' model?
37. What file will rails look for given the following erb: <%= render 'some_partial' %>?
38. Determine the value of the variable x after the execution of the following code. x = [1,2,3] x.pop until x.empty? x.push(4) while x.empty?
39. If you want to append an item to an array, what is the standard method?
40. which one is class method?
41. Which is NOT a model validation method?
42. What part of a migration runs during a rollback?
43. Which of the following is a working ruby while-loop?
44. A module cannot be subclassed or instantiated.
45. Where will routes.rb file appear?
46. If you want the standard restful routes for your person controller, how do you add that?
47. What is the difference between Symbol and String?
48. belongs_to: Represents the inverse of a has_one (or has_many) association.
49. Most elegant way to include a javascript file needed for only one page?
50. Which is NOT a Ruby operator?
51. Which command, when run, will compile all assets in the 'app/assets' directory and copy compiled versions to a configured target directory ('public/assets' by default)?
52. How do you remove a column during a migration?
53. If you create PostsController, where will Rails look for its templates by default?
54. Which will check the array named 'big_data' for the presence of a key 'icecream'?
55. Which is NOT an ActiveRecord query method?
56. If you have posts and each post has_many comments, how do you structure your routes?
57. Which of these is NOT a default subdirectory of the app/ directory?
58. How would you check to see if an array named COLORS contains the the value 'red'?
59. Which would create a new project without unit test?
60. Which is NOT a reserved Ruby logic flow word?
61. What is the output for the following? x = 1==1 ? 'a' : 'b'; puts x
62. What is not a RESTful controller action?
63. Where do you add named scopes?
64. Unit tests are used to test what part of a Rails application?
65. Which is an incorrectly defined method?
66. Which command would generate a DogController with a 'bark' action?
67. What is the main step to add ajax call in Ruby on Rails?
68. If you want to display the price of an item, with a :time_span tag, where would you place this code?
69. Which does NOT append 'nine' to the array: 'big_data'?
70. In the context of unit testing Rails applications, 'fixture' refers to which of the following?
71. What is the output of the following? @@x = 10 puts defined? @@x
72. Which of these is not a valid form helper?
73. Ruby 1.9, what new method of building key-value pairs is supported?
74. In a Rails migration, what's the syntax for creating a table?
75. When rendering a partial on a collection, what is the recommended method?
76. A correct example of class inheritance from 'Exception' into 'Bomber'
77. Which is NOT an ActiveRecord migration method?
78. Ruby supports single inheritance, multiple inheritance, or both?
79. A class variable (not class level instance variable) has a name beginning with ___________.
80. String objects are _______.
81. Does RoR supports multiple inheritance?
82. The session is, by default, accessible to:
83. Which of the following is a correctly formatted multi-line comment?
84. Functional tests are used to test what part of a Rails application?
85. What is the main function of helpers used in Ruby on Rails?
86. Which controller methods is NOT properly paired with its HTTP counterpart?
87. What is the output of the following? puts 'a\nb'
88. To randomize the order of entries in an Array, use the _______ method.
89. Which of these is NOT a valid way of associating models?
90. When you've got a form, and when the user submits invalid data, you redirect back to the edit form. If you want to show a general error message (not tied to validation errors) to the user, you'd do which of the following?
91. What is the output of the following? $x = 10 puts defined? $X
92. Which of these code blocks cannot be right?
93. Which column type is NOT supported by Active Record?
94. Which expression will not return a sum of array elements in Ruby on Rails?
95. What is the proper way to subclass a Module?
96. What is not a proper REST verb?
97. How does the Asset Pipeline (Rails 3.1 +) deal with different precompiled versions of an asset?
98. How do you render a variable in ERB template?
99. What kind of variables are Author and AUTHOR?
100. What does Model.reset_column_information do?
101. Best practice to implement translations of the title of a component in the view using i18n API?
102. For your app to route the 'http://myapp.com/' to the home controller, index action; what could you add to your routes.rb file?
103. If the class User has a belongs_to :role, which table has the foreign key?
104. Which of the following associations does NOT declare a many-to-many relationship?
105. Procs are objects, Blocks are not.
106. What is the ActionView form helper tag for
107. Which HTTP method is used by default when clicking a button defined using the ActionView helper method 'button_to'?
108. The Controller in Post#create: what is the 'best practice' action when the user submits an invalid form?
109. link_to('link text', url, :remote => true) does which of the following?
110. If a method is protected:
111. All Ruby number objects are instances of class _____.
112. Which is valid objects of class Integer or one of its subclasses? 1) -123 2) 0xFF 3) 123_456_789 4) 123456789123456789123456789123456789
113. What's an equivalent way of performing the following (h is a Hash): h.each { |k,v| h.delete k if k.nil? }
114. In The Author Model, how do you create a nested association between Authors and Blogs?
115. Which is not a valid callback?
116. Determine the value of the variable a, b and c after the execution of the following code. a, b, c = 1, 2, 3, 4
117. In development mode (config.assets.digest = false), if a file exists in app/assets/javascript/hello.js, which link will show that file ?
118. If you're using the standard Rails RESTful routes, then which of the following actions map to the url, '/posts'?
119. Handling an AJAX request in controller, which of the following redirects to google?
120. Counter caches can be used for:
121. You've got a form, and when the user submits invalid data, you simply show them an error page (no redirect). In the controller, to show the general error on the rendered page, you would add:
122. Output of the following ? person1 = 'Tim' person2 = person1 person1[0] = 'J' puts person1 puts person2
123. If your controller gets an action that it will render a template for, and you need to add a flash notice to the page, you'd use:
124. Given code: ; module Wheeled; end ; class Vehicle; end ; class Car < Vehicle ; include Wheeled ; end ; What is the value of this expression: Car.new.kind_of? Wheeled
125. Which one IS NOT an application server:
126. Choose the correct result p a = 1, a = 2
127. Which of the following will return false?
128. Which of the following are NOT Ruby keywords? 1) alias 2) yield 3) defined? 4) include?
129. We have given: str = 'abcdef' Which of the following will return the string 'def'? 1) str[0,-3] 2) str[-3,3] 3) str[4,3] 4) str['def']
130. Which of the following is a built-in feature of ActiveRecord
131. Output of the following? a = (1 <=> 2) b = (1 <=> 1.0) c = (b <=> a) puts c
132. To establish an association from a Post model to another Post model (say if one post is in response to another and there is a parent_post_id column on the posts table), you would add the following to the Post model:
133. What is Strong Parameters in rails 4 ?
134. how Date.today differs from Date.current?
135. Initialize method is always:
136. Which of the following will return true?
137. The index_by method is...
138. Which of the following is not a standard validates option?
139. What is the output of following? 1==(0||1)
140. True or False. Using 'rails g scaffold card', this will create a Card controller, model and views.
141. I already have a project running locally on port 3000. How can I start another project on port 3001?
142. Where you define the gems used in a Ruby on Rails application?
143. How to add a coffeescript file, follow the Asset Pipeline rules, somewhere in the 'view'?
144. MVC stand as:
145. How you can load your database with seeded data
146. The best practice says:
147. What is the purpose of config.ru file?
148. The databases supported by ActiveRecord without any other gem are:
149. [1,2,3,5,8,13].include? '8'
150. a = (1..3).reduce(-6){ |i,x| x + i } puts a
151. What is the difference between Post.find(3) and Post.find_by_id(3) ?
152. what does method ActiveSupport::Inflector.constantize do?
153. If @user is not null, the expression <%= @user.present? ? 'Yes' : 'No' %> return:
154. Where declare validations to a application?
155. Where to add business logic? a) Model b) Controller c) View
156. Which of these statements will utilize the gem named 'mygem
157. Let we have declared a Student class. What is output of this statement? Student.class
158. What is the right command to see the list of available tasks?
159. After importing from GitHub our Ruby on Rails project via the terminal using 'git clone ...', what is required to do to ensure we can start working on our project?
160. What is the difference between 'rake --quiet' and 'rake --silent'?
161. How to print the list of available generators?
162. Standard table name for has_and_belongs_to_many relationship between teams and users?
163. The 'rails c' command...
164. Proc is a nameless function, an anonymous method.
165. As of Rails 3, where is the default location for code that does environment-specific configuration?
166. Which option will find a row from the User table having id = 1?
167. Which are Rails specific assertions to the test/unit framework?
168. With an XHTML document, how can quirks mode be triggered in Internet Explorer?
169. Which options in the Ruby on Rails MVC architecture handles the dynamic data and the classes with the database?
170. In the case of Rails application performance optimization, select all valid ways to do assets compilation:
171. What is the best way to get the current request URL in Rails?
172. 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)?
173. Which commands adds the data model info to the model file?
174. Which HTML template languages are supported by Ruby?
175. In a has_many association, what is the difference between build and new? // user.rb has_many :posts // post.rb belongs_to :user
176. What is the output of the following code? test*5
177. When using full-page caching, what happens when an incoming request matches a page in the cache?
178. Difference between _url and _path while being used in routes?
179. Which code samples will get the index of |page| inside of a loop?
180. Which 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
181. What is the output of the following Ruby code? puts 'The multiplication output of 10,10,2 is #{10*10*2}'
182. What is difference between 'has_one' and 'belong_to'?
183. Which is the correct way to know the Rails root directory path?
184. Best way to create primary key as a string field instead of integer in rails.
185. What is the recommended Rails way to iterate over records for display in a view?
186. where we use attr_accessor and attr_accessible in rails ?
187. 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
188. Which part of the MVC stack does ERB or HAML typically participate in?
189. Which of the following items are stored in the models subdirectory?
190. What is the output of the following code in Ruby? x= 'A' + 'B' puts x y= 'C' << 'D' puts y
191. Which gem is used to install a debugger in Rails 3?
192. 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
193. What component of Rails are tested with unit tests?
194. Which of the following replaced the Prototype JavaScript library in Ruby on Rails as the default JavaScript library?
195. If a method #decoupage(n) is described as O(n^2), what does that mean?
196. What is green-threading?
197. Which of the following assertions are used in testing views?
198. Is an AJAX call synchronous or asynchronous?
199. Which of the following commands will clear out sample users from the development database?
200. 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?
201. 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
202. Which the correct way to skip ActiveRecords in Rails 3?
203. Which is the default way that Rails seeds data for tests?
204. Which of the following options, when passed as arguments, skips a particular validation?
205. What declaration would you use to set the layout for a controller?
206. What is the output of the following code? puts 'aeiou'.sub(/[aeiou]/, '*')
207. 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?
208. What is the difference between :dependent => :destroy and :dependent => :delete_all in Rails?
209. Which of the following methods is used to check whether an object is valid or invalid?
210. Which of the following is the correct way to rollback a migration?
211. Which of the following is the correct syntax for an input field of radio buttons in form_for?
212. 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();' %>
213. In order to enable locking on a table, which of the following columns is added?
214. If a float is added to an integer, what is the class of the resulting number? i.e. 1.0 + 2
215. In a Rails Migration, which of the following will make a column unique, and then have it indexed?
216. Which will disable browser page caching in Rails?
217. 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?
218. Following code snippet: def index render end The corresponding index.html.erb view is as following:
219. If a controller is named 'Users', what would its helpers module be called?
220. Which of the following serves as a structural skeleton for all HTML pages created?
221. Which of the following statements is incorrect?
222. What is the Singleton design pattern?
223. 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?
224. What does REST stand for?
225. 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?
226. Which is not true about log levels in Ruby on Rails?
227. When a new controller named 'admin2' is created, the JS and the CSS files are created in:
228. Select all incorrect statements regarding the Ruby Version Manager (RVM):
229. Which is not a built-in Rails caching strategy used to reduce database calls?
230. In a Rails application, the developmental and production configuration are stored in the:
231. What is the convention for methods which end with a question mark? e.g. #all?, #kind_of?, directory?
232. Which is correctly handles the currency field? A) add_column :items, :price, :decimal, :precision => 8, :scale => 2 B) add_money :items, :price, currency: { present: false }
233. How can a partial called 'cart' be rendered from a controller called 'ProductsController', assuming the partial is in a directory called 'shared'?
234. What does the 4xx series of HTTP errors represent?
235. Which of the following validations in Rails checks for null fields?
236. Using ERB for views, what filename should be given to a partial called 'login'?
237. 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?
238. For the String class, what's the difference between '#slice' and '#slice!'?
239. Which controller actions (by default) are best suited to handle the GET HTTP request?
240. Rails automatically requires certain files in an application. Which of the following files are automatically included without an explicit 'require' being necessary?
241. Which is true about writing tests for a Ruby on Rails application?
242. What is the behavior of class variables with subclasses?
243. 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?
244. 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?
245. If a model called BlogComment is defined, what would its DB table be blog_commentcalled?
246. What is the output of the following code? $val = 20 print 'Sample Text\n' if $val
247. Which option will disable the rendering of the view associated with a controller action?
248. The =~ operator is used to do inline Regular Expression matching, for instance: 'function' =~ /fun/ 'function' =~ /dinosaurs/ What are possible return values for the =~ matcher?
249. Which of the following options is used to create a form HTML in the erb files?
250. Which of the following actions is fired by default when a new controller is created?
251. Which of the following statements regarding models in Ruby on Rails is correct?
252. What is the purpose of the model in an MVC architecture framework such as Ruby on Rails?
253. For the String class, when using #gsub! what are the potential return values?
254. Which of the following options will create a many-to-many relation between the 'users' and the 'jobs' tables?
255. If we need to associate one model with many others, what associations should we use?
256. Which option will create a new Rails application with default templates?
257. 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?
258. During the deployment of the Rails application through Git, you want certain files to be ignored. Which of the following files performs that operation?
259. 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?
260. Which will change a Rails 3 app to run in production mode?
261. Which of the following validations checks if a passed value is an enumeration and falls in the given range?
262. Which option will correctly show an image in the HTML ERB template in Rails?
263. Which of the following will return a User object when used with a model which deals with a table named User?
264. After executing the following code, what will the value of foo be? foo = 'bar' wom = Proc.new {|foo| foo = 'baz'} wom.call('pling')
265. Which of the following validations are supported by models?
266. The asset tag helpers do not verify the existence of the assets at the specified locations.
267. Which of these tools are for checking Ruby code styling?
268. What is TDD is rails3?
269. How can the Heroku deprecation warning be removed from a Rails plugin that has been used?
270. Which is not an advantage of using an integrated development environment (IDE) for Rails ,compared with using a simple text editor?
271. Which of the following protects 'NOT NULL' fields against missing a user input?
272. Which statement is true regarding the find_or_create method in Ruby on Rails?
273. Which of these files determine Ruby version and gemset for RVM library?
274. Which of these options is right to create default scope of model in Rails?
275. What is the difference between jruby and ruby?
276. Which of the following types of callbacks are available in ROR?
277. Please select the True statements from the following:
278. Which of the following statements is correct?
279. What is the lowest version of Ruby supported by Ruby on Rails 5?
280. Calls to the render method generally accept using the following options?
281. The following methods trigger validations, and will save the object to the database only if the object is valid? (check any that apply)
282. What are the asset tag helpers available in Rails? (check any that apply)
283. Which of these is not a valid Bundler command?
284. What are the Available callbacks? (check any that apply)
285. Which instances are variables in your functional tests? (check any that apply)
286. In Ruby on Rails, an action is typically a basic ____ that describes how to respond to a specific external web-browser request?
287. A controller is a server-side _____ of Rails that responds to external requests from the web server to the application?
288. Purpose of using below code in filter_parameter_logging.rb? Rails.application.config.filter_parameters += [:password]
289. Difference between 'has_many :through' and 'has_and_belongs_to_many'?
290. The following methods skip validations, and will save the object to the database regardless of its validity?
291. Which of the following statements are correct about Types of Templates? (choose all that apply)
292. How do you permit nester attributes in Rails controllers for such model? class User has_one :profile accepts_nested_attributes_for :profile end
293. How is it possible to create combined unique index for two fields?
294. Which of these options for 'dependent' do not exist in Rails?
295. The has_one association supports following options?
296. 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
297. Which of the following loops is not supported by Ruby?
298. Which declaration can be used to override the default layout conventions in your controllers?
299. Which is used to achieve multiple inheritance in Ruby?
300. Which command is used to list all the routes of an RoR application?
301. Which file contains the Gem requirements of an RoR App?
302. Which rake commands can be used to load a schema.rb file into the database?
303. Which file contains the database credentials of an RoR application?
304. What is the difference between Lambdas and procs?
305. Which methods can be used inside a controller to prevent CSRF attack?
306. Which method is used in views to prevent CSRF attack?
307. How to disable protection of CSRF attacks for API requests?
308. What is the difference between find() and find_by_id() method?
309. 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.
310. Which helper should be used when your model has association with other models and they also need to be validated?
311. Which type of association is not supported by ActiveRecord?
312. Which method is used to render partial templates as part of a view?
313. render method does not accept ________________
314. Which notation is used to create class variables?
315.
316. In order to use optimistic locking, the table needs to have a column called ___________ of type integer.
317. Which represents the inverse of a has_one association?
318. Which of these expressions is equivalent to this code? a ||= 'string'
319. Which is the correct way to add a field in a signup that is not present in the User Model?
320. Which code 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
321. Which will open directly is correct about Open URI?
322. Which of these routes is not generated by “resource :user”?
323. Which of these methods catch Exception in Rails controllers?
324. Which of these model methods will be generated by this code? enum state: { blocked: 0, active: 1 }
325. Which of these server is the default development server for Ruby on Rails 5?
326. Which type of field is recommended for storing 'enum' in Rails?
327. What is the top-level model class added in Ruby on Rails 5?
328. Which code is correct about Creating links
329. While installing Ruby, why do you sometimes get a missing 'psych' error?
330. Which command will you use in Updates Ruby in the latest version?
331. Which code snippet can be used to include all javascript files?
332. Which code snippet can be used to include all javascript files?
333. What is the SQL equivalent of following code? user=User.take(3)
334. Why would let() be used in rspec?
335. Which of these statements about Ruby on Rails 5 are false?
336. Which URL's will not be created by method resources :posts in routes.rb?
337. Which folder do not exist in folder “app” in Rails 5? (check any that apply)
338. Which of these filters do not exist in Rails controller? (check any that apply)
339. Which of these files are located by default in 'config' directory? (check any that apply)
340. Which 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)
341. The send_data method has the following options? send_data(data, options = {})
342. What is the CGI Library? (check any that apply)
343. Which gems is used for authentication in Ruby on Rails? (check any that apply)
344. What does the expression x ||= y mean?
345. When rendering a partial in a view, how would you pass local variables for rendering?
346. Within a Rails controller, which code will prevent the parent controller's before_action :get_feature from running?
347. Which statement correctly describes a difference between the form helper methods form_tag and form_for?
348. What is before_action (formerly known as before_filter)?
349. Which module can you use to encapsulate a cohesive chunk of functionality into a mixin?
350. In Rails, which code would you use to define a route that handles both the PUT and PATCH REST HTTP verbs?
351. Which choice includes standard REST HTTP verbs?
352. Which ActiveRecord query prevents SQL injection?
353. Are instance variables set within a controller method accessible within a view?
354. When a validation of a field in a Rails model fails, where are the messages for validation errors stored?
355. How would you generate a drop-down menu that allows the user to select from a collection of product names?
356. For a Rails validator, how would you define an error message for the model attribute address with the message "This address is invalid"?
357. Given the URL helper product_path(@product), which statement would be expected to be false?
358. In Rails, how would you cache a partial template that is rendered?
359. What is the reason for using Concerns in Rails?
360. When using an ActiveRecord model, which method will create the model instance in memory and save it to the database?
361. 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?
362. In ActiveRecord, what is the difference between the has_many and has_many :through associations?
363. How do you add Ruby code inside Rails views and have its result outputted in the HTML file?
364. How would you render a view using a different layout in an ERB HTML view?
365. Where should you put images, JavaScript, and CSS so that they get processed by the asset pipeline?
366. If the Rails asset pipeline is being used to serve JavaScript files, how would you include a link to one of those JavaScript files in a view?
367. In Rails, what caching stores can be used?
368. What is the correct way to generate a ProductsController with an index action using only the command-line tools bundled with Rails?
369. If a model class is named Product, in which database table will ActiveRecord store and retrieve model instances?
370. What is a popular alternative template language for generating views in a Rails app that is focused on simple abstracted markup?
371. When Ruby methods add an exclamation point at the end of their name (such as sort!), what does it typically indicate?
372. Which Rails helper would you use in the application view to protect against CSRF (Cross-Site Request Forgery) attacks?
373. In a Rails controller, what does the code params.permit(:name, :sku) do?
374. Review the code below. Which Ruby operator should be used to fill in the blank so that the sort method executes properly? [5,8,2,6,1,3].sort {|v1,v2| v1 ___ v2}
375. Which statement about ActiveRecord models is true?
376. Which choice best describes the expected value of @result? @result = Article.first.tags.build(name: 'Urgent')
377. Which part of the Rails framework is primarily responsible for making decisions about how to respond to a browser request?
378. If User is an ActiveRecord class, which choice would be expected to return an array?
379. Which choice is not a valid Rails route?
380. Given a table of blog_posts and a related table of comments (comments made on each blog post), which ActiveRecord query will retrieve all blog posts with comments created during @range?
381. Which choice is an incorrect way to render a partial?
382. Which code sample will skip running the login_required "before" filter on the get_posts controller action?