define Material model
generate StudyController
generate MaterialsController
Study#index
Study#subject
subject has_many :materials
update routes
Materials#exams(temporary)
add :material_type to :materials
Materials#new(exam)
Materials#create
add :page to :materials
Materials#exams
Materials#download
Fix a bug: Enable to save same-titled files
Materials#edit, update
increment download_count
Materials#destroy
restrict Materials#edit,update,destroy to admin or file_owner
personal -> personal_files