Sha256: 4736a5c622d9d81c387fb10200b571cadbd2646b34217da1800f0c9f278737b4

Contents?: true

Size: 250 Bytes

Versions: 3

Compression:

Stored size: 250 Bytes

Contents

class PagesController < ApplicationController
  metaslug_vars :page

  def show
    @page = Page.find_by(slug: params[:slug])
    if @page
      render :show, locals: { page: @page }
    else
      render nothing: true, status: 404
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
metaslug-0.3.5 test/dummy/app/controllers/pages_controller.rb
metaslug-0.3.4 test/dummy/app/controllers/pages_controller.rb
metaslug-0.3.3 test/dummy/app/controllers/pages_controller.rb