Git Product home page Git Product logo

Comments (3)

jeremyevans avatar jeremyevans commented on July 29, 2024

I'm not a haml/slim user, so there's no chance I'll be adding it myself, but I'll certainly consider patches that don't break anything related to ERB. Forme itself isn't tied to ERB at all, but I'm not sure that the block-based hacking that the Sinatra integration currently does will work with haml. I don't know enough about slim to guess whether it will work. You can use Forme without the integration, but it would definitely be clunky.

FWIW, the current support for ERB has issues, one of which is that passing the Forme::Form object to a partial doesn't work correctly by default (you have to reset output = @_out_buf inside every partial).

from forme.

tkellen avatar tkellen commented on July 29, 2024

Good to know--I hadn't run across that yet. I've submitted a patch that appears to fix the issue (all tests pass) but it might be affecting more than I realized.

from forme.

tmsrjs avatar tmsrjs commented on July 29, 2024

@tkellen @jeremyevans I know it's been a while but this works perfectly for haml:

-#app/views/forms/_some_partial.html.haml
= Forme::Rails::Form.form({ action: '/foo' }, template: self) do |f|
  %fieldset
    = f.input :text, name: 'foo', value: 'bar'

from forme.

Related Issues (10)

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.