app/controllers/pulitzer/posts_controller.rb in pulitzer-0.5.7 vs app/controllers/pulitzer/posts_controller.rb in pulitzer-0.5.8
- old
+ new
@@ -1,7 +1,7 @@
class Pulitzer::PostsController < Pulitzer::ApplicationController
- before_filter :get_post, only: [:show, :edit, :edit_slug, :update,
+ before_filter :get_post, only: [:show, :edit, :edit_title, :edit_slug, :update,
:update_slug, :processing_preview]
def index
@post_type = Pulitzer::PostType.find params[:post_type_id]
@posts = Pulitzer::Post.where(post_type: @post_type).order(id: :desc)
@@ -22,11 +22,15 @@
render partial: 'show', locals: { post: @post }
end
def edit
if request.xhr?
- render partial: 'form', locals: { post: @post }
+ render partial: 'edit', locals: { post: @post }
end
+ end
+
+ def edit_title
+ render partial: 'form', locals: { post: @post }
end
def update
@post.update_attributes(post_params)
render partial: 'show', locals: { post: @post }