converted main.rb of the old porject-blog into pages_controller