Sha256: d2168ad81059e02a883818e79edcdb760d194429ee56a11e724763f735435dbc

Contents?: true

Size: 844 Bytes

Versions: 2

Compression:

Stored size: 844 Bytes

Contents

# map.<%=rule_name%> '/rules/<%=rule_name%>', :controller => "Rules::<%=rule_class%>",  :action => :index
module Rules
  class <%=rule_class%>Controller < ApplicationController    
    helper :rules_engine 
    layout 'rules_engine'

    # before_filter :login_required
    before_filter :rules_engine_reader_access_required,  :only => [:index]

    def index
      time_code = Time.now.strftime("%Y")
      @re_tweet_words = Re<%=rule_class%>Count.find(:all, :conditions => ["time_code = ?", time_code], 
                                   :order => "word_count DESC",
                                   :include => :re_<%=rule_name%>, 
                                   :limit => 100)
      
      # paginate(:page => params[:page] || 1, :per_page => 5)
      render :template => '/re_rule_definitions/<%=rule_name%>/index'
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rules_engine_templates-0.0.5 rails_generators/templates/app/controllers/rules/tweet_word_writer_controller.rb
rules_engine_templates-0.0.4 rails_generators/templates/app/controllers/rules/tweet_word_writer_controller.rb