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

819 replace page text with custom page #854

Conversation

Trevor-Robinson
Copy link
Contributor

🔗 Issue

#819

✍️ Description

Changed all occurrences of page text to custom page. Created migration to update table name as well. All tests are passing with new name.

@jmilljr24
Copy link
Collaborator

@all-contributors
please add @Trevor-Robinson for code.

Copy link
Contributor

@jmilljr24

I've put up a pull request to add @Trevor-Robinson! 🎉

@jmilljr24
Copy link
Collaborator

jmilljr24 commented Jun 28, 2024

@Trevor-Robinson Thanks for working on this! Can you take a look at the conflicts when you get a chance?

@@ -0,0 +1,25 @@
class Organizations::Staff::CustomPagesController < Organizations::BaseController
Copy link
Collaborator

@kasugaijin kasugaijin Jun 30, 2024

Choose a reason for hiding this comment

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

While you are back in this for the conflicts, can you please nest these modules/class instead of inline. We are trying to move to nested slowly but surely. Not a biggie if not, but sweet if you can.

I.e.

module Organizations
  module Staff
    class CustomPagesController...

@kasugaijin
Copy link
Collaborator

hey @Trevor-Robinson all you have to run now is rails standard:fix to get the linter to pass :)

@Trevor-Robinson
Copy link
Contributor Author

Should be all good now.

Copy link
Collaborator

@kasugaijin kasugaijin left a comment

Choose a reason for hiding this comment

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

Thank you! @Trevor-Robinson

@kasugaijin kasugaijin merged commit 5d8513c into rubyforgood:main Jul 3, 2024
5 checks passed
@kasugaijin
Copy link
Collaborator

kasugaijin commented Jul 7, 2024

@Trevor-Robinson Just a heads up - I missed it in the review, but there were some issues with the naming you used on migrations. First, I am not sure why you changed the class names of the two existing migrations from PageText to CustomPage. You should never change an existing migration (the only exception might be if it's the latest one). But this can cause a lot of unintended consequences. You are better of making changes through new migrations.

Also, the naming of the latest migration was wrong - i.e. the filename should always match the class name so Rails knows where to find the class when you call it. See below.

These are not major issues and easy to fix, but I wanted to provide feedback. Also, I am not sure how the schema got updated with the new table name despite these migration errors...the migrations should have failed. So, did you update the file manually by chance? That's also a red flag if you had to do that.

image

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