Class: Muck::PostsController
- Inherits:
-
ContentsController
- Object
- ContentsController
- Muck::PostsController
- Defined in:
- app/controllers/muck/posts_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
6 7 8 9 10 11 12 |
# File 'app/controllers/muck/posts_controller.rb', line 6 def index @posts = @blog.posts.by_newest respond_to do |format| format.html { render :template => 'posts/index', :layout => 'popup' } format.pjs { render :template => 'posts/index', :layout => false } end end |
#new ⇒ Object
20 21 22 23 24 |
# File 'app/controllers/muck/posts_controller.rb', line 20 def new @content = @blog.posts.new() @new_content_message = t('muck.blogs.add_post') super end |
#show ⇒ Object
14 15 16 17 18 |
# File 'app/controllers/muck/posts_controller.rb', line 14 def show @content = Content.find(params[:id], :scope => Content.contentable_to_scope(@blog)) if @blog @content ||= Content.find(params[:id]) super end |