Skip to content

Infer edit_path from Post type #411

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

Merged
merged 1 commit into from
Aug 22, 2018
Merged

Infer edit_path from Post type #411

merged 1 commit into from
Aug 22, 2018

Conversation

enricostano
Copy link
Contributor

WAT

Fix #409

Test

That Offer and Inquiry can be modified again.

@enricostano
Copy link
Contributor Author

Deployed to https://staging.timeoverflow.org

@sseerrggii
Copy link
Contributor

sseerrggii commented Aug 21, 2018

Tested
Fixed! 👍 Works fine again
Thanks @enricostano

Copy link
Collaborator

@markets markets left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@enricostano I just leave a comment about a different (and probably simpler, since we don't need an extra helper method) way to infer the edit path, but this also works for me 👍

@@ -1,4 +1,4 @@
<%= link_to post, class: "btn btn-warning" do %>
<%= link_to get_edit_path(post), class: "btn btn-warning" do %>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about this?

link_to [:edit, post]

@enricostano
Copy link
Contributor Author

I knew there was a better way, I've been doing this tons of times.... thank you for refreshing my memory @markets 😍

To pay for my sins I also created #412

@enricostano
Copy link
Contributor Author

Tested again on staging 🍏

@enricostano enricostano merged commit 6438b60 into develop Aug 22, 2018
@enricostano enricostano deleted the fix/edit-post-link branch August 22, 2018 16:23
@enricostano enricostano mentioned this pull request Aug 31, 2018
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