Class: Components::ModelSummary
- Inherits:
-
ModelCard
- Object
- ModelCard
- Components::ModelSummary
- Defined in:
- app/components/model_summary.rb
Instance Method Summary collapse
-
#initialize(model:) ⇒ ModelSummary
constructor
A new instance of ModelSummary.
- #view_template ⇒ Object
Constructor Details
#initialize(model:) ⇒ ModelSummary
Returns a new instance of ModelSummary.
4 5 6 |
# File 'app/components/model_summary.rb', line 4 def initialize(model:) @model = model end |
Instance Method Details
#view_template ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'app/components/model_summary.rb', line 8 def view_template div class: "card" do div class: "card-body row" do div class: "col" do h5 { @model.name } span { @model.model_files.count } whitespace span { ModelFile.model_name.human count: @model.model_files.count } span { " : " } code { @model.path } end div(class: "col-auto") do credits div { @model..map { Tag(tag: it) } } end end end end |