Code Monkey home page Code Monkey logo

Comments (5)

riverrun avatar riverrun commented on August 24, 2024

Thanks for reporting this issue. I'll look into it and get back to you soon.

from phauxth.

riverrun avatar riverrun commented on August 24, 2024

I've added some changes to the master branch. I've made the report function overridable and updated the Confirm.Login module to use it. As you can see from the Confirm.Login example, it is not necessary to redefine all the report clauses - you just need to add your additional entries and then add an additional clause calling super on the arguments.

Let me know how that works and / or if you need any further information.

from phauxth.

joshchernoff avatar joshchernoff commented on August 24, 2024

Thank you very much. I will give some feed back once I get a chance to look into it. :)

from phauxth.

joshchernoff avatar joshchernoff commented on August 24, 2024

Nice so allowing for the override was what looks like needed to happen.

I made a simple example app showing how I'm trying to use a custom login module.
https://github.com/digitalcake/active_user_example_phauxth/blob/master/lib/active_user_example_phauxth/accounts/login.ex

Let me know if that is inline with your design you had for how people would extend that base login module. ("aside from extracting the reports & messages to its own module ect..")

So far it looks like it works. Thanks for the help again.

from phauxth.

riverrun avatar riverrun commented on August 24, 2024

I just updated the hex package with the new changes.

Thanks for showing me the example. I have just one comment to make. For the report fallback function, you just need one clause, like this:

def report(result, ok_message, meta) do
    super(result, ok_message, meta)
end

The pattern matching is then done by the default implementation. This is how the new version of the Confirm.Login module works.

from phauxth.

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.