globalid
turbo-rails
globalid | turbo-rails | |
---|---|---|
8 | 48 | |
1,175 | 1,975 | |
0.5% | 1.0% | |
6.4 | 8.3 | |
3 months ago | 8 days ago | |
Ruby | JavaScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
globalid
-
Where to save tokens for temporal links?
If you are solely linking to resources within your application, you should read on and consider using Rails Global Id. It also handles expiry, we've used them at every Rails company I've worked at. Best part is you don't need to worry about storing them in your DB.
-
load lazy values inside your views
As for the issue with context, I think it's also solvable I think. And passing for example current_user (or current_user_id) would be possible. Probably with this https://github.com/rails/globalid
-
Best practice for making urls secure for a website that has no login?
You could use a signed GlobalID for this, which would also give you the ability to generate URLs that expire. https://github.com/rails/globalid
-
Rails + Sidekiq : Switching database per request
did something similar, I ended up using a globalid as the parameter to the job, and the globalid had a parameter with the database name
-
Turbo Streams meets Action Cable
to_gid_param generates the Global ID for a model and then Base64 encodes it. For strings, to_param returns the object itself. For symbols, it returns the object's string representation.
-
Compress signed global_id to shorten shareable string
Hi guys, I want to know if it is possible to generate a signed global_id string, for example like this "BAhJIh5naWQ6Ly9pZGluYWlkaS9Vc2VyLzM5NTk5BjoGRVQ=--81d7358dd5ee2ca33189bb404592df5e8d11420e" and then shorten it, and then return it to its original state. I need to track a record by an "ID" and I was thinking signed global_id is great but it's too long I'm thinking something no longer than 20 characters, the other option I thought of is a UUID, and then encode it to some base like 32 or 58 maybe?, but it misses the awesomeness of the global id. What advice do you recommend to obtain a short string that allows me to share it and track a record? https://github.com/rails/globalid
-
Automatically Unsubscribe from Emails in Rails (and Control Email Preferences)
You can test this be getting the Global ID of a user and going to the endpoint.
-
Behind GitHub’s new authentication token formats
Ruby/Rails has this in the form of GlobalID[1]. To be honest I haven't seen it used outside of whatever Rails itself automatically does, but the concept is there.
[1]https://github.com/rails/globalid
turbo-rails
-
Can't get Rails 7 turbo_stream_from to update view from broadcast
The install notes here link to an issue specific to webpacker. Try that and see if it works?
-
Strong reasons to pick htmx, over hotwire?
True, in theory it is. A lot of it is coded in libraries like turbo-rails, though. And these are Rails-specific. But I've seen it being used in some Laravel projects, also I used it with Hanami.
-
Rails 7 - Turbo Frame and Turbo Stream
Check out https://github.com/hotwired/turbo-rails/blob/main/app/models/turbo/streams/tag_builder.rb
-
Use turbo_streams to update the client in real time from inside a loop?
So apart from the pretty obvious question of "why on earth would you want to do this?", I think there's a misunderstanding here of the intended use case of turbo streams. You have a page, and then some state changes on the server and you want to update the page to reflect that. Incrementing a variable doesn't really qualify as a state change, but perhaps a Product changing from "not good" to "good" would be an event worth broadcasting, which you could do using the Broadcastable concern in turbo-rails.
-
Where do I start for learning "HTML over the wire"
Use this too: https://github.com/hotwired/turbo-rails
-
Using ViewComponents with Turbo
Not mentioned in the article, but it's nice that turbo-rails recently gained the ability to pass ViewComponent objects directly to turbo stream helpers. https://github.com/hotwired/turbo-rails/pull/433
- is turbo and stimulus compatible with rails 4 ?
-
Turbo-Rails just got better
Release notes: https://github.com/hotwired/turbo-rails/releases/tag/v1.4.0
-
Live Visit Count for website or page. ActionCable, Turbo Broadcasts, Kredis
turbo/streams_channel.rb - a way to link a turbo stream with an ActionCable channel.
-
We're breaking up with JavaScript front ends
The readme seems to give a pretty good overview of turbo: https://github.com/hotwired/turbo-rails
What are some alternatives?
lazy_value - Rails Lazy value loader
Stimulus - A modest JavaScript framework for the HTML you already have
render-later - Render-later allows you to defer the rendering of slow parts of your views to the end of the page, allowing you to drastically improve the time to first paint and perceived performance.
hotwire-rails - Use Hotwire in your Ruby on Rails app
Turbolinks - Turbolinks makes navigating your web application faster
Webpacker - Use Webpack to manage app-like JavaScript modules in Rails
hotwire-tabs
webpack - A bundler for javascript and friends. Packs many modules into a few bundled assets. Code Splitting allows for loading parts of the application on demand. Through "loaders", modules can be CommonJs, AMD, ES6 modules, CSS, Images, JSON, Coffeescript, LESS, ... and your custom stuff.
sprockets - Rack-based asset packaging system
IntersectionObserver - Intersection Observer
hotwire-realtime-nested-comments
Redis - Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes, Streams, HyperLogLogs, Bitmaps.