問題は四択で10問ずつ合計70問あります。各問題には解答がついていますが、はじめは閉じた状態でトライしてみてください。
10問毎に「終了/採点」ボタンをクリックすると採点ができます。次の10問へお進みください。繰り返しトライすることも可能です。
1: Rails3::Application.routes.draw do 2: __(1)__ 3: end
1: Rails3::Application.routes.draw do 2: resources :users do 3: __(1)__ do 4: get :preview 5: end 6: end 7: end
1: class Admin::UsersController < ApplicationController 2: __(1)__ 3: 4: def index 5: @users = Users.all 6: end 7: 8: private 9: def require_admin 10: redirect_to welcome_path unless current_user.admin? 11: end 12: end
1: class BooksController < ApplicationController 2: def create 3: @book = Book.new(params[:book]) 4: if @book.save 5: __(1)__ 6: else 7: render :action => :new 8: end 9: end 10: end
リスト1 1: class User < ActiveRecord::Base 2: end
リスト2 1: <% User.all.each do |user| %> 2: <%= __(1)__ user.name, user %> 3: <% end %>
リスト1 1: <html> 2: <head> 3: __(1)__ 4: </head> 5: <body> 6: <%= yield %> 7: </body> 8: </html>
リスト2 1: <% content_for :head do %> 2: <title>Hello world</title> 3: <% end %>
リスト1 1: Rails3::Application.routes.draw do 2: resources :users 3: end
リスト2 1: <%= url_for User.find(1) %>
1: class NotifierMailer < ActionMailer::Base 2: __(1)__ 3: 4: def welcome(recipient) 5: mail :to => recipient.email 6: end 7: end
1: class EmployeesControllerTest < ActionController::TestCase 2: __(1)__ 3: test "the truth" do 4: assert true 5: end 6: end
1: class UsersControllerTest < ActionController::TestCase 2: test "should get index" do 3: get :index 4: __(1)__ 5: end 6: end