Class: Kublog::NotificationsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/kublog/notifications_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#current_user, #is_admin?, #require_admin

Instance Method Details

#previewObject



4
5
6
7
8
9
10
# File 'app/controllers/kublog/notifications_controller.rb', line 4

def preview
  @post = Post.new(params[:post])
  @preview = Notification.email_template(@post)
  respond_to do |format|
    format.json { render :json => {:preview => @preview }}
  end
end