{"action":"created","issue":{"url":"https://api.github.com/repos/plataformatec/simple_form/issues/1217","repository_url":"https://api.github.com/repos/plataformatec/simple_form","labels_url":"https://api.github.com/repos/plataformatec/simple_form/issues/1217/labels{/name}","comments_url":"https://api.github.com/repos/plataformatec/simple_form/issues/1217/comments","events_url":"https://api.github.com/repos/plataformatec/simple_form/issues/1217/events","html_url":"https://github.com/plataformatec/simple_form/issues/1217","id":60363243,"number":1217,"title":"Config option default_form_class does not work as expected","user":{"login":"jurglic","id":112600,"avatar_url":"https://avatars.githubusercontent.com/u/112600?v=3","gravatar_id":"","url":"https://api.github.com/users/jurglic","html_url":"https://github.com/jurglic","followers_url":"https://api.github.com/users/jurglic/followers","following_url":"https://api.github.com/users/jurglic/following{/other_user}","gists_url":"https://api.github.com/users/jurglic/gists{/gist_id}","starred_url":"https://api.github.com/users/jurglic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jurglic/subscriptions","organizations_url":"https://api.github.com/users/jurglic/orgs","repos_url":"https://api.github.com/users/jurglic/repos","events_url":"https://api.github.com/users/jurglic/events{/privacy}","received_events_url":"https://api.github.com/users/jurglic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-03-09T15:46:16Z","updated_at":"2016-02-29T02:48:16Z","closed_at":null,"body":"I'm upgrading an application to Rails 4, and during this upgrade the SimpleForm gem is also upgraded from 2.1 to 3.1.\r\n\r\nThis application uses custom class for forms built with SimpleForm. Its initializer for SF looks like this:\r\n```ruby\r\nSimpleForm.setup do |config|\r\n  ...\r\n  config.form_class = 'my_form_class'\r\n  ...\r\nend\r\n```\r\n\r\nRunning the app like that produces depraction message suggestion to use `default_form_class` instead.\r\n\r\nBut using `default_form_class` in the initializer doesn't get the same result: no form gets configured 'my_form_class', but they get 'simple_form'. Looks like this setting is not working at all, or am I missing someting?"},"comment":{"url":"https://api.github.com/repos/plataformatec/simple_form/issues/comments/190012741","html_url":"https://github.com/plataformatec/simple_form/issues/1217#issuecomment-190012741","issue_url":"https://api.github.com/repos/plataformatec/simple_form/issues/1217","id":190012741,"user":{"login":"rmm5t","id":740,"avatar_url":"https://avatars.githubusercontent.com/u/740?v=3","gravatar_id":"","url":"https://api.github.com/users/rmm5t","html_url":"https://github.com/rmm5t","followers_url":"https://api.github.com/users/rmm5t/followers","following_url":"https://api.github.com/users/rmm5t/following{/other_user}","gists_url":"https://api.github.com/users/rmm5t/gists{/gist_id}","starred_url":"https://api.github.com/users/rmm5t/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmm5t/subscriptions","organizations_url":"https://api.github.com/users/rmm5t/orgs","repos_url":"https://api.github.com/users/rmm5t/repos","events_url":"https://api.github.com/users/rmm5t/events{/privacy}","received_events_url":"https://api.github.com/users/rmm5t/received_events","type":"User","site_admin":false},"created_at":"2016-02-29T02:48:16Z","updated_at":"2016-02-29T02:48:16Z","body":">  We want the `form_class` to be added both when `html: { :class }` is passed to simple_form_for and when it is not. This was the behavior prior to 3.1. It is not possible to get this behavior without using `config.form_class`.\r\n\r\nSorry. This was the decision we made at the time. The problem before was that there were _no_ way to get rid of the underlying `config.form_class` setting. \r\n\r\n> It is not possible to get this behavior without using `config.form_class`.\r\n\r\nSure there is. You just have to be explicit in your `html: { :class }` override by including _all_ the classes you want there. \r\n\r\nIn my opinion, if you're setting  `html: { :class }`, that's all that should show up on the form element. Anything else breaks the [principle of least surprise](https://en.wikipedia.org/wiki/Principle_of_least_astonishment). I understand it breaks existing behavior of concatenating `config.form_class` with everything, but I believe that old behavior to be flawed and more error-prone.\r\n"}}