gemfile and put methods in posts controller