class DogBiscuits::PresenterGenerator

Public Instance Methods

banner() click to toggle source
presenter_template() click to toggle source

This is in a separate generator to try and get round the NameError on first run

caused when calling constantize on class_name (ie. the model class) in the template
# File lib/generators/dog_biscuits/presenter/presenter_generator.rb, line 21
def presenter_template
  template('presenter.rb.erb', File.join('app/presenters/hyrax', class_path, "#{file_name}_presenter.rb"))
  rescue NameError => e
    say_status("error", e.message, :red)
end