Commit db93b5d9 by tady

%Nameで名前置換

parent 88046d32
......@@ -42,6 +42,13 @@ class PostsController < ApplicationController
@post = Post.new
end
def fork
@post = set_post.clone
@post.title = @post.title.gsub(/%Name/, current_user.name)
@post.title = Time.now.strftime(@post.title) # TODO
render action: 'new'
end
# GET /posts/1/edit
def edit
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment