Hi there @James08 ;
Here are some Rails questions to get things rolling.
The correct answer is always the first one.
Which architecture pattern does Rails implement?
Model-View-Controller
Model View Presenter
Operational Data Store
Event-driven architecture
Which component of Rails responds to external requests from the web server?
Controller
Model
Helper
Database
How would you declare a 1:n assosciation in Rails?
Using “has_many” and “belongs_to”
Using “has_one” and “has_n”
Using “has_many” and “:dependent”
Using “has_and_belongs_to_many”
What purpose does the asset pipeline serve?
To concatenate and minify JavaScript and CSS files
To cache and compress images
To speed up database queries
To reduce server latency
Which command should you run to make rails aware of a change in your database schema?
rake db:migrate
rake db:update
rake db:teardown
rake db:reload
What will the following output?
p "SITEPOINT ROCKS!".downcase.gsub(/\\b\\w/) { |match| match.upcase }
“Sitepoint Rocks!”
“sitepoint rocks!”
“SITEPOINT rocks!”
“SiTePoInT RoCkS!”
What will the following output?
@user = User.find(1)
<%= link_to "User Details", user_path(@user) %>
<a href=“/users/1”>User Details</a>
<a href=“/users?id=1”>User Details</a>
<a href=“http://www.yoursite.com/users/1”>User Details</a>
Nothing, you cannot pass user_path an object
How would you generate the following:
<input accept="text/html" type="file" id="post_attached" name="post[attached]" />
file_field(:post, :attached, :accept => ‘text/html’)
file_field(:id => ‘post’, :name => ‘attached’, :accept => ‘text/html’)
input_field(:post, :attached, :accept => ‘text/html’)
input_field(:type=> ‘file’, :id => ‘post’, :name => ‘attached’, :accept => ‘text/html’)
Which ORM does Rails use to connect classes to relational database tables
Active Record
Active Mapper
Active Object
Active Data
What would the following output?
number_with_delimiter(1240.99, ".", ",")
1.240,99
1,240.99
1240,99
1240.99