Sha256: 9b850e69bd96297ce0d9171ad9d50a74677dff4aa8c4f083c1248733834f9707

Contents?: true

Size: 807 Bytes

Versions: 22

Compression:

Stored size: 807 Bytes

Contents

class NewsController < ApplicationController

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

  def index

    x = params[:pg]

    @items = News.all


  end

  def show
    @item = News.find params['id']
  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

22 entries across 22 versions & 1 rubygems

Version Path
optimacms-0.3.35 spec/dummy/app/controllers/news_controller.rb
optimacms-0.3.34 spec/dummy/app/controllers/news_controller.rb
optimacms-0.3.30 spec/dummy/app/controllers/news_controller.rb
optimacms-0.3.29 spec/dummy/app/controllers/news_controller.rb
optimacms-0.3.23 spec/dummy/app/controllers/news_controller.rb
optimacms-0.3.15 spec/dummy/app/controllers/news_controller.rb
optimacms-0.3.12 spec/dummy/app/controllers/news_controller.rb
optimacms-0.3.11 spec/dummy/app/controllers/news_controller.rb
optimacms-0.2.26 spec/dummy/app/controllers/news_controller.rb
optimacms-0.2.25 spec/dummy/app/controllers/news_controller.rb
optimacms-0.2.24 spec/dummy/app/controllers/news_controller.rb
optimacms-0.3.4 spec/dummy/app/controllers/news_controller.rb
optimacms-0.3.3 spec/dummy/app/controllers/news_controller.rb
optimacms-0.2.21 spec/dummy/app/controllers/news_controller.rb
optimacms-0.2.20 spec/dummy/app/controllers/news_controller.rb
optimacms-0.2.16 spec/dummy/app/controllers/news_controller.rb
optimacms-0.2.15 spec/dummy/app/controllers/news_controller.rb
optimacms-0.2.14 spec/dummy/app/controllers/news_controller.rb
optimacms-0.2.13 spec/dummy/app/controllers/news_controller.rb
optimacms-0.2.12 spec/dummy/app/controllers/news_controller.rb