Sha256: 1ba5d85f034046fef5a269be9f050e4fca7eedab9eb62044cccb094836118213

Contents?: true

Size: 724 Bytes

Versions: 18

Compression:

Stored size: 724 Bytes

Contents

class NewsController < ApplicationController

  before_action :set_page, only: [:index, :index_page]

  def index

    @items = News.all


  end

  def index_page(tpl_filename=nil)

    @items = News.all

    @v_news = 9

    #@template = 'pages/news2.html.erb'
    #render nothing: true
    #(render template: tpl_filename) unless tpl_filename.nil?
    #my_render

    #render 'pages/news2.html'
    #render template: 'pages/news2.html.erb', locals: {pg: 4}

  end


  def default_render11(*args)
    #render 'pages/news2.html.erb'
    unless @optimacms_tpl.nil?
      render @optimacms_tpl and return
    end

    super
  end

  def set_page
    @pg = params[:pg] || 1
  end

end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
optimacms-0.1.36 test/dummy/app/controllers/news_controller.rb
optimacms-0.1.34 test/dummy/app/controllers/news_controller.rb
optimacms-0.1.32 test/dummy/app/controllers/news_controller.rb
optimacms-0.1.31 test/dummy/app/controllers/news_controller.rb
optimacms-0.1.28 test/dummy/app/controllers/news_controller.rb
optimacms-0.1.27 test/dummy/app/controllers/news_controller.rb
optimacms-0.1.25 test/dummy/app/controllers/news_controller.rb
optimacms-0.1.24 test/dummy/app/controllers/news_controller.rb
optimacms-0.1.23 test/dummy/app/controllers/news_controller.rb
optimacms-0.1.21 test/dummy/app/controllers/news_controller.rb
optimacms-0.1.19 test/dummy/app/controllers/news_controller.rb
optimacms-0.1.17 test/dummy/app/controllers/news_controller.rb
optimacms-0.1.15 test/dummy/app/controllers/news_controller.rb
optimacms-0.1.14 test/dummy/app/controllers/news_controller.rb
optimacms-0.1.5 test/dummy/app/controllers/news_controller.rb
optimacms-0.1.3 test/dummy/app/controllers/news_controller.rb
optimacms-0.1.2 test/dummy/app/controllers/news_controller.rb
optimacms-0.1.1 test/dummy/app/controllers/news_controller.rb