Sha256: dd7bcfdce47f6d65894f05cfdeea970fd549dc468139c049c3ba5236eb8486cd
Contents?: true
Size: 460 Bytes
Versions: 21
Compression:
Stored size: 460 Bytes
Contents
module Blog::Controllers class Edit < R '/edit/(\d+)', '/edit' def get post_id unless @state.user_id.blank? @user = User.find @state.user_id end @post = Post.find post_id render :edit end def post unless @state.user_id.blank? @post = Post.find input.post_id @post.update_attributes :title => input.post_title, :body => input.post_body redirect View, @post end end end end
Version data entries
21 entries across 21 versions & 1 rubygems