aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/file_validations_controller.rb
blob: f56cf8cebfd00765da7cc2fea8fb7bef7f6e99e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
class FileValidationsController < InheritedResources::Base
  respond_to :html, :xml, :json

  def show
    @toc = TestSheetPage.find("toc")
    show!
  end
  
  def new
    @toc = TestSheetPage.find("toc")
    new!
  end

  def create
    create! do |success, failure|
      success.html { redirect_to file_validations_path }
    end
  end

  protected

  def collection
    @file_validations ||= end_of_association_chain.paginate(:page => params[:page])
  end

end