{"id":39891221,"url":"https://github.com/lambda2/simple-form-addon","last_synced_at":"2026-01-18T14:42:51.667Z","repository":{"id":18186475,"uuid":"21303544","full_name":"lambda2/simple-form-addon","owner":"lambda2","description":null,"archived":false,"fork":false,"pushed_at":"2014-07-01T12:08:55.000Z","size":168,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-13T06:22:21.916Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lambda2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-06-28T13:44:27.000Z","updated_at":"2014-06-28T13:44:59.000Z","dependencies_parsed_at":"2022-08-25T15:50:22.006Z","dependency_job_id":null,"html_url":"https://github.com/lambda2/simple-form-addon","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lambda2/simple-form-addon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambda2%2Fsimple-form-addon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambda2%2Fsimple-form-addon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambda2%2Fsimple-form-addon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambda2%2Fsimple-form-addon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lambda2","download_url":"https://codeload.github.com/lambda2/simple-form-addon/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambda2%2Fsimple-form-addon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28538295,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T13:04:05.990Z","status":"ssl_error","status_checked_at":"2026-01-18T13:01:44.092Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-18T14:42:51.551Z","updated_at":"2026-01-18T14:42:51.658Z","avatar_url":"https://github.com/lambda2.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n## index.html.haml:\n\n```haml\n\n\n.container\n  .row\n    .col-lg-12\n      %h3 Test formulaire\n\n      = simple_form_for @beer do |f|\n        = f.input :name, :class =\u003e \"form-control\", :append =\u003e \"$\"\n        = f.input :percentage, as: :integer, :class =\u003e \"form-control\", :prepend =\u003e \"#\"\n        = f.input :name, :class =\u003e \"form-control\", :prepend =\u003e \"un\", :append =\u003e \"et deux\"\n        = f.input :description, as: :text, :class =\u003e \"form-control\"\n\n\n```\n\n## [simple_form_addon.rb](https://github.com/lambda2/simple-form-addon/blob/master/config/initializers/simple_form_addon.rb):\n\n```ruby\nmodule SimpleForm\n  module Components\n    module Addon\n\n      def append\n        addon(options[:append])\n      end\n\n      def prepend\n        addon(options[:prepend])\n      end\n\n      def has_append?\n        append.present?\n      end\n\n      def has_prepend?\n        prepend.present?\n      end\n\n      def addon(content)\n        if content\n          \"\u003cspan class=\\\"input-group-addon\\\"\u003e#{content.to_s.html_safe}\u003c/span\u003e\"\n        end\n      end\n\n    end\n  end\nend\n\nSimpleForm::Inputs::Base.send(:include, SimpleForm::Components::Addon)\n\n```\n\n## [simple_form_bootstrap.rb](https://github.com/lambda2/simple-form-addon/blob/master/config/initializers/simple_form_bootstrap.rb):\n\n\n```ruby\n\n# Use this setup block to configure all options available in SimpleForm.\nSimpleForm.setup do |config|\n  config.button_class = 'btn btn-default'\n  config.boolean_label_class = nil\n\n  config.wrappers :vertical_form, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|\n    b.use :html5\n    b.use :placeholder\n    b.use :label, class: 'control-label'\n\n\n    b.wrapper tag: 'div', class: 'input-group' do |ba|\n      ba.use :prepend # Pour le prepend (a gauche)\n      ba.use :input, class: 'form-control'\n      ba.use :append # Pour le append (a droite)\n      ba.use :error, wrap_with: { tag: 'span', class: 'help-block' }\n      ba.use :hint,  wrap_with: { tag: 'p', class: 'help-block' }\n    end\n  end\n\n  ...\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambda2%2Fsimple-form-addon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flambda2%2Fsimple-form-addon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambda2%2Fsimple-form-addon/lists"}