Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate the presenter into the local application
This makes it easier to add custom behavior to the local application in the correct place. This follows the behavior of the form object.
- Loading branch information
Showing
6 changed files
with
31 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Generated via | ||
# `rails generate hyrax:work <%= class_name %>` | ||
module Hyrax | ||
class <%= class_name %>Presenter < Hyrax::WorkShowPresenter | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Generated via | ||
# `rails generate hyrax:work <%= class_name %>` | ||
require 'rails_helper' | ||
|
||
RSpec.describe Hyrax::<%= class_name %>Presenter do | ||
it "has tests" do | ||
skip "Add your tests here" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters