You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
449 B
17 lines
449 B
class DocumentIndexTableComponent < BaseComponent |
|
with_collection_parameter :search_result |
|
attr_reader :search_result, :opts |
|
|
|
def initialize(search_result:, current_user:) |
|
@search_result = search_result |
|
end |
|
|
|
delegate :reference_number, to: :search_result |
|
delegate :title, to: :search_result |
|
|
|
def date_or_year |
|
return search_result.docdate.strftime("%m/%d/%Y") if search_result.docdate.present? |
|
|
|
search_result.year |
|
end |
|
end
|
|
|