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

Version Path
bivouac-0.0.5 examples/blog_goh/app/controllers/edit.rb
bivouac-0.0.6 examples/blog_goh/app/controllers/edit.rb
bivouac-0.0.7 examples/blog_goh/app/controllers/edit.rb
bivouac-0.0.3 examples/blog_goh/app/controllers/edit.rb
bivouac-0.0.4 examples/blog_goh/app/controllers/edit.rb
bivouac-0.0.9 examples/blog_goh/app/controllers/edit.rb
bivouac-0.0.8 examples/blog_goh/app/controllers/edit.rb
bivouac-0.1.1 examples/blog_goh/app/controllers/edit.rb
bivouac-0.1.0 examples/blog_goh/app/controllers/edit.rb
bivouac-0.1.2 examples/blog_goh/app/controllers/edit.rb
bivouac-0.1.3 examples/blog_goh/app/controllers/edit.rb
bivouac-0.1.4 examples/blog_goh/app/controllers/edit.rb
bivouac-0.1.5 examples/blog_goh/app/controllers/edit.rb
bivouac-0.1.6 examples/blog_goh/app/controllers/edit.rb
bivouac-0.2.0 examples/blog_goh/app/controllers/edit.rb
bivouac-0.2.1 examples/blog_goh/app/controllers/edit.rb
bivouac-0.2.2 examples/blog_goh/app/controllers/edit.rb
bivouac-0.2.3 examples/blog_goh/app/controllers/edit.rb
bivouac-0.2.4 examples/blog_goh/app/controllers/edit.rb
bivouac-0.2.5 examples/blog_goh/app/controllers/edit.rb