app/controllers/materials_controller.rb
# All teaching material ordered by name
All teaching material ordered by name
All teaching material ordered by name
def index
		@materials = Material.order("name ASC").all.group_by{|m| m.name[0]}
	end
def index @materials = Material . order ( "name ASC" ) . all . group_by { | m | m . name [ 0 ] } end
All teaching material ordered by name
All teaching material ordered by name