yhirano55 / approval Goto Github PK
View Code? Open in Web Editor NEW:ok_man::no_good: Approval flow for Rails
License: MIT License
:ok_man::no_good: Approval flow for Rails
License: MIT License
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).
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
Hi,
Is it possible that any Admin user can approve change request for a target record or its possible only for specific user?
Thanks
Nested attributes are not included in the approval request.
Error: " TypeError: superclass must be a Class (Module given)" coming while creating approval request data
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.