Giter Site home page Giter Site logo

Comments (9)

kzkn avatar kzkn commented on August 10, 2024 1

Thanks for reply and suggestion.
I find the helpers and mime-type handling provided by this gem to be valuable enough.

from turbo-rails.

dhh avatar dhh commented on August 10, 2024 1

Actually, yes, fair point. If you want to do the work to automatically detect whether ActionCable is present or not, and turn off the bits that need turning off, go ahead!

from turbo-rails.

dhh avatar dhh commented on August 10, 2024

I don't think this gem makes sense if you're not using Action Cable. All the meat of the functionality here is around cable broadcasts. You can just use the turbo javascript library directly without this gem.

from turbo-rails.

equivalent avatar equivalent commented on August 10, 2024

👍 I have similar case. I'm experimenting with turbo-rails on a project which will never have action_cable but the whole concept of turbo frames makes sense. I'll use the native JS turbo (not a problem ) but it would be nice to have same set of helpers for the Rails views

from turbo-rails.

dhh avatar dhh commented on August 10, 2024

@kzkn The custom mime type is only used for streams.

@equivalent Adding a gem dependency just to get these two lines of code seems a bit much: https://github.com/hotwired/turbo-rails/blob/main/app/helpers/turbo/frames_helper.rb#L27

from turbo-rails.

equivalent avatar equivalent commented on August 10, 2024

@dhh agree. I wanted to update my comment that I'll just copy and paste it from there 👍 Thank you for reply

from turbo-rails.

kzkn avatar kzkn commented on August 10, 2024

The custom mime type is only used for streams.

Yes. But streams can be used without ActionCable, right? And it's quite useful 😃

from turbo-rails.

boardfish avatar boardfish commented on August 10, 2024

hotwired/hotwire-rails#36 is linked to this issue. A good use case might be if you're spinning up a lightweight Rails app with rails new --minimal; bundle add hotwire-rails to test something out.

from turbo-rails.

boardfish avatar boardfish commented on August 10, 2024

As mentioned over there, touch config/cable.yml for an acceptable workaround, but I might open a PR here to see if we can avoid that step at all.

from turbo-rails.

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.