GithubHelp home page GithubHelp logo

Comments (9)

smartinez87 avatar smartinez87 commented on May 27, 2024

That's how it's supposed to work. Custom partials should be under app/views/exception_notifier directory, as it explains on the "Customization" part of the README.

Please, correct me if I'm not understanding your issue.

from exception_notification.

scrozier avatar scrozier commented on May 27, 2024

My custom partial is in app/views/exception_notifier. The problem is that exception_notifier doesn't seem to find it unless I make the change shown in my message. (See the 2nd and 3rd lines of my code.)

So it looks like exception_notifier is doing render 'user', which doesn't have the /exception_notifier/ part of the path.

Maybe it would have been clearer if I had written

summary = render("exception_notifier/#{section}")

above.

Said more succinctly, exception_notifier does not find my custom partial, which is in the right place, as written. I had to modify it (exception_notifier) to find my partial.

Am I making any sense?

from exception_notification.

bostrom avatar bostrom commented on May 27, 2024

You need to add the path manually e.g. in your initializer file (config/initializers/exception_notifier.rb), like

ExceptionNotifier::Notifier.prepend_view_path File.join(Rails.root, 'app/views')

Maybe this could be done internally, since the documentation instructs to just add views to your /app/views and nothing else?

from exception_notification.

scrozier avatar scrozier commented on May 27, 2024

Thanks, bostrom...so I'm not crazy.

I'll see if I can't change this in the code and submit a pull request.

from exception_notification.

smartinez87 avatar smartinez87 commented on May 27, 2024

hey @scrozier @bostrom, is this fixed already? Can I close this issue?

from exception_notification.

bostrom avatar bostrom commented on May 27, 2024

Not to my knowledge. I haven't checked the code, but at the time of my last comment it didn't work the way the documentation said. So IMO either add the 'app/views' path by default in the code or update the documentation to instruct users to add it manually like I did in my previous comment.

from exception_notification.

scrozier avatar scrozier commented on May 27, 2024

@smartinez87, no, I don't think it's fixed. I was waiting for some feedback from you, but I think @bostrom and I are in agreement that it's still broken.

I will get on this and submit a pull request today or tomorrow.

from exception_notification.

scrozier avatar scrozier commented on May 27, 2024

Just submitted a pull request.

Thanks to @bostrom for a clean solution. I was taking a somewhat less elegant approach. :-)

from exception_notification.

smartinez87 avatar smartinez87 commented on May 27, 2024

pull request #50 fixes this issue, so I'm closing this.

from exception_notification.

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.