Class: Admin::PostsController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/admin/posts_controller.rb

Instance Method Summary collapse

Instance Method Details

#editObject



14
15
16
# File 'app/controllers/admin/posts_controller.rb', line 14

def edit
  @post = Post.find(params[:id])
end

#newObject



4
5
6
7
8
9
10
11
12
# File 'app/controllers/admin/posts_controller.rb', line 4

def new
  @post = Post.new(:user_id => current_user.id)    
  @post.is_active = Spree::Config[:wordsmith_post_status_default]
  @post.commentable = Spree::Config[:wordsmith_post_comment_default]

  respond_to do |format|
    format.html
  end
end