Giter Club home page Giter Club logo

Comments (4)

moughxyz avatar moughxyz commented on August 12, 2024 2

But I don't think the parent route's before_action runs for the sub-routes?

Tbh you'll just have to run and test the different scenarios, as it's been well over a year since I've been in this codebase, so can't really remember specifics.

a quick win

😡Quick win == technical debt.

But feel free to create the PR in the direction you would naturally take, and then we could discuss specifics on the PR itself.

from listed.

moughxyz avatar moughxyz commented on August 12, 2024 1

Would the fix be as simple as adding:

Seems like it! Perhaps we can add this to any author page that should be stylized and remove it from being exclusive to posts_controller.show method.

from listed.

cesarferradas avatar cesarferradas commented on August 12, 2024

Sounds good! Thanks for clarifying.

Looks like we already add the styles and meta images to all author pages in the authors_controller:

But I don't think the parent route's before_action runs for the sub-routes?

That's the only way I can explain the nested :guestbook path being the only one with no custom CSS or favicon. The nested :posts path required adding this to the posts_controller so that it didn't have the same issue (I think?):

@styles = @post.author.styles
set_meta_images_for_author(@post.author)

Even though similar code exists in the parent authors_controller.

I think a quick win would be to just add a similar code block to the guestbook_entries_controller's before_action.

Will make a PR, let me know if you're happy with the proposed changes.

from listed.

antsgar avatar antsgar commented on August 12, 2024

This one's probably been fixed with #68

from listed.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.