9elements / aygabtu Goto Github PK
View Code? Open in Web Editor NEWAll your GETs are belong to us
License: MIT License
All your GETs are belong to us
License: MIT License
Use case is probably focus: true
most of the time.
Maybe a scope method is the right way here, but that would require creating an artificial context when a scope method is used with an action, and not with a block.
NT
handle.rb:28 - @verbose
point_of_call:18 - @gem_root
Use case would be things like remaining.pend
.
Totally doable, but what should it look like?
Due to the internal semantics of remaining
, it is not possible to test remaining routes multiple times, i.e. in a desktop and mobile version.
remaining do
visit
visit_with(mobile_version: true)
end
When visiting the second (mobile) version, the route was already removed from aygabtu_matching_routes
and thus no matching routes is found at runtime.
I had the problem that i run in an
Failure/Error: remaining.static_routes.visit
RuntimeError:
No matching route (action was: :visit, diagnostics: #<Aygabtu scope (remaining_at: CP 36, dynamic: false)>
error - took me a while to figure out that i need to wrap it in a
aygabtu_matching_routes(remaining).any?
my expectation was that it would be handeld by the gem so i have nothing to do with it...if there are no actions left to visit it should just skip the line, as expected when i call a .each on an empty array.
p.s.: what is CP?
An idea for another scope method, which matches routes which have no further (subtracting visiting_with params) url segments missing, something like:
requiring(:id).visiting_with(id: 5).visitable.visit
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.