moonleerecords/moonlee-website

View on GitHub
app/controllers/records/artists_controller.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Records
  class ArtistsController < Records::BaseController
    before_action do
      promoted_releases(3)
      upcoming_events(5)
      social_posts
    end

    def index
      @artists = Artist.on_records
      meta_tags('Artists', 'Label artists')
    end

    def show
      @artist = Artist.friendly.find(params[:id])
      @cover_image = {
        image: @artist.image,
        type: 'artist'
      }
      meta_tags(@artist.name, @artist.description, @artist.image.url(:large))
    end
  end
end