GithubHelp home page GithubHelp logo

yhirano55 / approval Goto Github PK

View Code? Open in Web Editor NEW
110.0 110.0 25.0 94 KB

:ok_man::no_good: Approval flow for Rails

License: MIT License

Ruby 99.71% Shell 0.29%
approval-process rails-engine ruby

approval's People

Contributors

284km avatar awcodify avatar florentferry avatar mhmenon910 avatar tsugimoto avatar yhirano55 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

approval's Issues

Deprecation warning with Rails 6

With Rails 6 the following deprecation warning is shown:

DEPRECATION WARNING: Initialization autoloaded the constant Approval::Mixins.

Being able to do this is deprecated. Autoloading during initialization is going
to be an error condition in future versions of Rails.

Reloading does not reboot the application, and therefore code executed during
initialization does not run again. So, if you reload Approval::Mixins, for example,
the expected changes won't be reflected in that stale Module object.

This autoloaded constant has been unloaded.

Please, check the "Autoloading and Reloading Constants" guide for solutions.

I'm using rails 6.0.3.6 and approval 0.7.1

[enhancement] rake task generated migration does not recognise primary key type

Problem:
The migration generated from bundle exec rails generate approval:install does not recognize the type of the primary id being used, thus one has to manually adjust the migration file if a non-integer type, e.g. uuid is used. Affected columns are:

  • approval_comments.user_id
  • approval_items.resource_id
  • approval_requests.request_user_id
  • approval_requests.respond_user_id

Suggestion:
Let bundle exec rails generate approval:install accept an argument to set the type of the primary key type (defaults to integer if omitted for convenience).

add a docs example to show how to handle validation errors?

when you file a request rather than do a normal save it doesn't seem like model validation errors display in the form.

i handled this with the code below, but i'm not sure it's the best solution or if it's handling all possible errors. would be good to address this in the docs!

    def create
        @service = current_user.organisation.services.build(service_params)
        if @service.valid?
            current_user.request_for_create(@service, reason: "something").save
            redirect_to organisations_path, notice: "Your service has been submitted for review. You'll be emailed when it's approved."
        else
            render "new"
        end
    end

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.