2017-04-29から1日間の記事一覧
元記事はこちら 翻訳 Bad Smell class PostsController < ApplicationController def publish @post = Post.find(params[:id]) @post.update_attribute(:is_published, true) @post.approved_by = current_user if @post.created_at > Time.now - 7.days @po…