-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
include time for date_time field in index #1129
include time for date_time field in index #1129
Conversation
locals: { field: date_time, namespace: "admin" }, | ||
) | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/TrailingBlankLines: Final newline missing.
) | ||
|
||
render( | ||
partial: "fields/date_time/index.html.erb", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/FirstParameterIndentation: Indent the first parameter one step more than the start of the previous line.
date_time = instance_double( | ||
"Administrate::Field::DateTime.with_options(format: #{Time::DATE_FORMATS[:default]})", | ||
data: product, | ||
datetime: product.created_at |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/TrailingCommaInArguments: Put a comma after the last parameter of a multiline method call.
it "renders date_time" do | ||
product = create(:product) | ||
date_time = instance_double( | ||
"Administrate::Field::DateTime.with_options(format: #{Time::DATE_FORMATS[:default]})", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/FirstParameterIndentation: Indent the first parameter one step more than the start of the previous line.
Metrics/LineLength: Line is too long. [95/80]
Looks good, thanks! |
#710
Just modifies the index view template for the date_time field to display the time (as well as the date) as is being done in the show template.