Sha256: 8812e90a2df1dc3cc43b0a864e8f28806ba264bb27111bf5a9e35403cd79ee6f

Contents?: true

Size: 364 Bytes

Versions: 11

Compression:

Stored size: 364 Bytes

Contents

class AuthorsController < ApplicationController
  before_action :set_author, only: :show

  # GET /authors
  def index
    @authors = Author.all
  end

  # GET /authors/author-slug
  def show
  end

  private
    # Use callbacks to share common setup or constraints between actions.
    def set_author
      @author = Author.friendly.find(params[:id])
    end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
friendly_id-method_scopes-0.3.7 spec/dummy/app/controllers/authors_controller.rb
friendly_id-method_scopes-0.3.3 spec/dummy/app/controllers/authors_controller.rb
friendly_id-method_scopes-0.3.2 spec/dummy/app/controllers/authors_controller.rb
friendly_id-method_scopes-0.3.1 spec/dummy/app/controllers/authors_controller.rb
friendly_id-method_scopes-0.3.0 spec/dummy/app/controllers/authors_controller.rb
friendly_id-method_scopes-0.2.6 spec/dummy/app/controllers/authors_controller.rb
friendly_id-method_scopes-0.2.5 spec/dummy/app/controllers/authors_controller.rb
friendly_id-method_scopes-0.1.8 spec/dummy/app/controllers/authors_controller.rb
friendly_id-method_scopes-0.1.7 spec/dummy/app/controllers/authors_controller.rb
friendly_id-method_scopes-0.1.6 spec/dummy/app/controllers/authors_controller.rb
friendly_id-method_scopes-0.1.5 spec/dummy/app/controllers/authors_controller.rb