{"action":"created","issue":{"url":"https://api.github.com/repos/justinfrench/formtastic/issues/1090","repository_url":"https://api.github.com/repos/justinfrench/formtastic","labels_url":"https://api.github.com/repos/justinfrench/formtastic/issues/1090/labels{/name}","comments_url":"https://api.github.com/repos/justinfrench/formtastic/issues/1090/comments","events_url":"https://api.github.com/repos/justinfrench/formtastic/issues/1090/events","html_url":"https://github.com/justinfrench/formtastic/issues/1090","id":47575690,"number":1090,"title":"\"too many arguments for format string\" when `$DEBUG` is true","user":{"login":"davidstosik","id":816901,"avatar_url":"https://avatars.githubusercontent.com/u/816901?v=3","gravatar_id":"","url":"https://api.github.com/users/davidstosik","html_url":"https://github.com/davidstosik","followers_url":"https://api.github.com/users/davidstosik/followers","following_url":"https://api.github.com/users/davidstosik/following{/other_user}","gists_url":"https://api.github.com/users/davidstosik/gists{/gist_id}","starred_url":"https://api.github.com/users/davidstosik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidstosik/subscriptions","organizations_url":"https://api.github.com/users/davidstosik/orgs","repos_url":"https://api.github.com/users/davidstosik/repos","events_url":"https://api.github.com/users/davidstosik/events{/privacy}","received_events_url":"https://api.github.com/users/davidstosik/received_events","type":"User","site_admin":false},"labels":[{"id":17245,"url":"https://api.github.com/repos/justinfrench/formtastic/labels/bug","name":"bug","color":"f7c6c7","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/justinfrench/formtastic/milestones/30","html_url":"https://github.com/justinfrench/formtastic/milestones/3.1.4","labels_url":"https://api.github.com/repos/justinfrench/formtastic/milestones/30/labels","id":868885,"number":30,"title":"3.1.4","description":"Hopefully the last in the 3.x series, mostly focused on bug fixes to leave 3.x in a good place.","creator":{"login":"justinfrench","id":5240,"avatar_url":"https://avatars.githubusercontent.com/u/5240?v=3","gravatar_id":"","url":"https://api.github.com/users/justinfrench","html_url":"https://github.com/justinfrench","followers_url":"https://api.github.com/users/justinfrench/followers","following_url":"https://api.github.com/users/justinfrench/following{/other_user}","gists_url":"https://api.github.com/users/justinfrench/gists{/gist_id}","starred_url":"https://api.github.com/users/justinfrench/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinfrench/subscriptions","organizations_url":"https://api.github.com/users/justinfrench/orgs","repos_url":"https://api.github.com/users/justinfrench/repos","events_url":"https://api.github.com/users/justinfrench/events{/privacy}","received_events_url":"https://api.github.com/users/justinfrench/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":4,"state":"closed","created_at":"2014-11-17T05:59:32Z","updated_at":"2016-03-26T21:44:49Z","due_on":null,"closed_at":"2016-03-26T21:44:49Z"},"comments":5,"created_at":"2014-11-03T09:31:24Z","updated_at":"2016-11-20T17:34:47Z","closed_at":"2014-12-11T00:20:02Z","body":"In Ruby 2, when `$DEBUG` is true, `sprintf` and `String#%` (among others) behavior is altered, making these methods throw an `ArgumentError` with message \"too many arguments for format string\" when more arguments than placeholders in the format string are used.\n\nSee [`$VERBOSE`, `$DEBUG` and `Kernel#sprintf`](https://bugs.ruby-lang.org/issues/2709) for more details.\n\nFormtastic sometimes fails at [lib/formtastic/helpers/fieldset_wrapper.rb#L50](https://github.com/justinfrench/formtastic/blob/master/lib/formtastic/helpers/fieldset_wrapper.rb#L50).\n"},"comment":{"url":"https://api.github.com/repos/justinfrench/formtastic/issues/comments/261792275","html_url":"https://github.com/justinfrench/formtastic/issues/1090#issuecomment-261792275","issue_url":"https://api.github.com/repos/justinfrench/formtastic/issues/1090","id":261792275,"user":{"login":"RemoteCoder","id":2696574,"avatar_url":"https://avatars.githubusercontent.com/u/2696574?v=3","gravatar_id":"","url":"https://api.github.com/users/RemoteCoder","html_url":"https://github.com/RemoteCoder","followers_url":"https://api.github.com/users/RemoteCoder/followers","following_url":"https://api.github.com/users/RemoteCoder/following{/other_user}","gists_url":"https://api.github.com/users/RemoteCoder/gists{/gist_id}","starred_url":"https://api.github.com/users/RemoteCoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RemoteCoder/subscriptions","organizations_url":"https://api.github.com/users/RemoteCoder/orgs","repos_url":"https://api.github.com/users/RemoteCoder/repos","events_url":"https://api.github.com/users/RemoteCoder/events{/privacy}","received_events_url":"https://api.github.com/users/RemoteCoder/received_events","type":"User","site_admin":false},"created_at":"2016-11-20T17:34:47Z","updated_at":"2016-11-20T17:34:47Z","body":"@justinfrench solution is below: after searching on google last 2 week not find any solution. One fo developer suggest me to use : \r\n f.semantic_fields_for \"StateImage\"\r\nAfter that my solution is: \r\nFormtastic requires you to wrap ALL inputs in an \"inputs\" block. So this should be:\r\n\r\n    f.inputs 'Campaign Image' do\r\n          f.semantic_fields_for :campaign_image, (f.object.campaign_image || CampaignImage.new) do |p|\r\n              p.inputs do\r\n                  p.input :campimage, :as => :file, :label => \"Image\"\r\n                  p.input :_destroy, :as => :boolean, :required => false, :label => 'Remove image', :hint =>       p.template.image_tag(campaign.campaign_image.campimage.url(:thumb)) if campaign.campaign_image.present? && campaign.campaign_image.campimage.present?\r\n       end\r\n    end\r\n   end"}}
{"actor":{"display_login":"RemoteCoder"}}