Skip to content
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

Merged

Conversation

mark100net
Copy link
Contributor

@mark100net mark100net commented Apr 1, 2018

#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.

locals: { field: date_time, namespace: "admin" },
)
end
end

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",

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

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]})",

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]

@nickcharlton
Copy link
Member

Looks good, thanks!

@nickcharlton nickcharlton merged commit a921c2e into thoughtbot:master Apr 20, 2018
@mark100net mark100net deleted the date-time-field-index-fix-710 branch April 22, 2018 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants