Sha256: f93e2875b81f7ac7b1d0d60a1d7688e7eae67a01f9c8f1715727edd2d1b2e1ee

Contents?: true

Size: 781 Bytes

Versions: 15

Compression:

Stored size: 781 Bytes

Contents

class NewsController < ApplicationController

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

  def index

    @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

15 entries across 15 versions & 1 rubygems

Version Path
optimacms-0.2.3 spec/dummy/app/controllers/news_controller.rb
optimacms-0.1.56 spec/dummy/app/controllers/news_controller.rb
optimacms-0.1.54 spec/dummy/app/controllers/news_controller.rb
optimacms-0.1.51 spec/dummy/app/controllers/news_controller.rb
optimacms-0.1.50 spec/dummy/app/controllers/news_controller.rb
optimacms-0.1.49 spec/dummy/app/controllers/news_controller.rb
optimacms-0.1.48 spec/dummy/app/controllers/news_controller.rb
optimacms-0.1.47 spec/dummy/app/controllers/news_controller.rb
optimacms-0.1.45 spec/dummy/app/controllers/news_controller.rb
optimacms-0.1.44 spec/dummy/app/controllers/news_controller.rb
optimacms-0.1.43 spec/dummy/app/controllers/news_controller.rb
optimacms-0.1.41 spec/dummy/app/controllers/news_controller.rb
optimacms-0.1.40 spec/dummy/app/controllers/news_controller.rb
optimacms-0.1.39 spec/dummy/app/controllers/news_controller.rb
optimacms-0.1.38 spec/dummy/app/controllers/news_controller.rb