Coder Social home page Coder Social logo

Comments (4)

baldwindavid avatar baldwindavid commented on July 24, 2024 2

I think this might too tightly couple this gem to that specific implementation. I personally use the https://github.com/jim/carmen-rails gem for country selection. Given that it is arguable which is more popular, it seems like probably neither should be supported out of the box. As an alternative, here is an example of how bootstrap_form can already be used with an existing helper. This example is how I might use it for the carmen-rails, but usage with the country_select could be the same...

<% = f.form_group :country_code, label: {text: "Country"} do %>
  <%= f.country_select :country_code, {priority: %w(US CA), prompt: 'Please select a country'}, class: 'form-control' %>
<% end %>

Perhaps there is an easier way to do this that I am not aware of, but this is fairly straight-forward.

from bootstrap_form.

carloslopes avatar carloslopes commented on July 24, 2024

@baldwindavid is correct. If there is a way that we can add some helpers or methods that help when use bootstrap-forms with these type of gems we can do, but add support for a specific one isn't the best solution imo. I'll close this for now, but if someone want comment something, fell free and we can open the issue again.

from bootstrap_form.

wingrunr21 avatar wingrunr21 commented on July 24, 2024

Perhaps an addons gem would be helpful for use cases like this. It could simply be a collection of modules that can be included via an initializer to expose the correct functionality for various helper gems like this.

from bootstrap_form.

duleorlovic avatar duleorlovic commented on July 24, 2024

@baldwindavid solution is more than enough

from bootstrap_form.

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.