Sha256: 4d03da6e8966b99fd0f3605ba7b400bad36bf5fbf119e70a1effcdc50d5d8652

Contents?: true

Size: 616 Bytes

Versions: 5

Compression:

Stored size: 616 Bytes

Contents

class <%= class_name %>sController < ApplicationController
  
  before_filter :load_items
  
  
  def load_items
    @<%= object_name %> = <%= class_name %>.find(params[:id]) if params[:id]
  end
  
  def index
    @<%= object_name %>s = <%= class_name %>.all(:order => "created_at")
  end
  
  def deliver
    @<%= object_name %>.deliver
    redirect_to :back
  end
  
  def deliver_all
    <%= class_name %>.deliver_all
    redirect_to :back
  end
  
  def destroy
    @<%= object_name %>.destroy
    redirect_to :back
  end
  
  def destroy_all
    <%= class_name %>.destroy_all
    redirect_to :back
  end
  
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
mdarby-mq-0.1.1 generators/mq/templates/emails_controller.rb
mdarby-mq-0.1.2 generators/mq/templates/emails_controller.rb
mdarby-mq-0.1 generators/mq/templates/emails_controller.rb
mq-0.1.3 generators/mq/templates/emails_controller.rb
mq-0.1.2 generators/mq/templates/emails_controller.rb