{"comment":{"created_at":"2011-10-17T02:48:22Z","body":"Ok, thanks a lot!","updated_at":"2011-10-17T02:48:22Z","url":"https://api.github.com/repos/justinfrench/formtastic/issues/comments/2424490","id":2424490,"user":{"gravatar_id":"d98f07753cb2705e918a5d4a1eb2a1fc","avatar_url":"https://secure.gravatar.com/avatar/d98f07753cb2705e918a5d4a1eb2a1fc?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/link-er","id":1128291,"login":"link-er"}},"action":"created","issue":{"number":718,"created_at":"2011-10-14T18:24:21Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"I used enumerated_attribute with formtastic ~> 1.2.3 with \"monkey patch\" for field :as => :enum and everything worked fine.\r\n\r\nBut when I updated formtastic to 2.0.2 version appeared an error with message \"Formtastic::UnknownInputError\".\r\n\r\nFor more details here is patch, that was added to /initialisers/formtastic.rb:\r\n\r\n\tmodule Formtastic #:nodoc:\r\n\t\tclass SemanticFormBuilder #:nodoc:\r\n\t\t\tdef enum_input(method, options)\r\n\t\t\t\tunless options[:collection]\r\n\t\t\t\t\tenum = @object.enums(method.to_sym)\r\n\t\t\t\t\tchoices = enum ? enum.select_options : []\r\n\t\t\t\t\toptions[:collection] = choices\r\n\t\t\t\tend\r\n\t\t\t\tif (value = @object.__send__(method.to_sym))\r\n\t\t\t\t\toptions[:selected] ||= value.to_s\r\n\t\t\t\telse\r\n\t\t\t\t\toptions[:include_blank] ||= true\r\n\t\t\t\tend\r\n\t\t\t\tselect_input(method, options)\r\n\t\t\tend\r\n\t\tend\r\n\tend\r\n\r\nP.S. I tried to change SemanticFormBuilder to FormBuilder (as I understood from new formtastic documentation there was such change for all custom inputs), but I was still getting error","comments":5,"title":"Integration with enumerated_attributes gem","updated_at":"2011-10-17T02:48:23Z","url":"https://api.github.com/repos/justinfrench/formtastic/issues/718","id":1912878,"assignee":null,"milestone":null,"closed_at":"2011-10-15T23:24:05Z","user":{"gravatar_id":"d98f07753cb2705e918a5d4a1eb2a1fc","avatar_url":"https://secure.gravatar.com/avatar/d98f07753cb2705e918a5d4a1eb2a1fc?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/link-er","id":1128291,"login":"link-er"},"html_url":"https://github.com/justinfrench/formtastic/issues/718","labels":[],"state":"closed"},"legacy":{"issue_id":1912878,"comment_id":2424490}}