{"action":"created","issue":{"url":"https://api.github.com/repos/rails/rails/issues/32324","repository_url":"https://api.github.com/repos/rails/rails","labels_url":"https://api.github.com/repos/rails/rails/issues/32324/labels{/name}","comments_url":"https://api.github.com/repos/rails/rails/issues/32324/comments","events_url":"https://api.github.com/repos/rails/rails/issues/32324/events","html_url":"https://github.com/rails/rails/issues/32324","id":307797934,"number":32324,"title":"Unable to create an attribute for an array","user":{"login":"volkanunsal","id":151600,"avatar_url":"https://avatars2.githubusercontent.com/u/151600?v=4","gravatar_id":"","url":"https://api.github.com/users/volkanunsal","html_url":"https://github.com/volkanunsal","followers_url":"https://api.github.com/users/volkanunsal/followers","following_url":"https://api.github.com/users/volkanunsal/following{/other_user}","gists_url":"https://api.github.com/users/volkanunsal/gists{/gist_id}","starred_url":"https://api.github.com/users/volkanunsal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/volkanunsal/subscriptions","organizations_url":"https://api.github.com/users/volkanunsal/orgs","repos_url":"https://api.github.com/users/volkanunsal/repos","events_url":"https://api.github.com/users/volkanunsal/events{/privacy}","received_events_url":"https://api.github.com/users/volkanunsal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-03-22T20:14:07Z","updated_at":"2018-03-23T00:17:13Z","closed_at":null,"author_association":"NONE","body":"### Steps to reproduce\r\n\r\nEasiest way is to enter the following in Rails console:\r\n\r\n```ruby\r\nActiveRecord::Type.lookup(:integer, array: true)\r\n```\r\n\r\nFrom a model, you can do this:\r\n\r\n```ruby\r\n  attribute :my_int_array, :integer, array: true\r\n```\r\n\r\n### Expected behavior\r\n\r\nAccording to [the documentation of `attribute` method](http://api.rubyonrails.org/classes/ActiveRecord/Attributes/ClassMethods.html#method-i-attribute), it should be possible to specify an attribute that is an array.\r\n\r\n```ruby\r\n  attribute :my_int_array, :integer, array: true\r\n```\r\n\r\n### Actual behavior\r\n\r\nSeeing this error:\r\n\r\n```\r\nArgumentError: unknown keyword: array\r\nfrom /Users/newuser/.rvm/gems/ruby-2.3.3@citiesense/gems/activemodel-5.1.5/lib/active_model/type/value.rb:6:in `initialize'\r\n```\r\n\r\n### System configuration\r\n**Rails version**:\r\n\r\n5.1.5\r\n\r\n**Ruby version**:\r\n\r\n2.3.3"},"comment":{"url":"https://api.github.com/repos/rails/rails/issues/comments/375499098","html_url":"https://github.com/rails/rails/issues/32324#issuecomment-375499098","issue_url":"https://api.github.com/repos/rails/rails/issues/32324","id":375499098,"user":{"login":"volkanunsal","id":151600,"avatar_url":"https://avatars2.githubusercontent.com/u/151600?v=4","gravatar_id":"","url":"https://api.github.com/users/volkanunsal","html_url":"https://github.com/volkanunsal","followers_url":"https://api.github.com/users/volkanunsal/followers","following_url":"https://api.github.com/users/volkanunsal/following{/other_user}","gists_url":"https://api.github.com/users/volkanunsal/gists{/gist_id}","starred_url":"https://api.github.com/users/volkanunsal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/volkanunsal/subscriptions","organizations_url":"https://api.github.com/users/volkanunsal/orgs","repos_url":"https://api.github.com/users/volkanunsal/repos","events_url":"https://api.github.com/users/volkanunsal/events{/privacy}","received_events_url":"https://api.github.com/users/volkanunsal/received_events","type":"User","site_admin":false},"created_at":"2018-03-23T00:17:13Z","updated_at":"2018-03-23T00:17:13Z","author_association":"NONE","body":"Originally I wanted to create an attribute for an array inside a jsonb\ncolumn. I assume I can’t use this option for that either then.\n\n-- \n*Volkan Unsal*\n*Product Engineer*\nvolkanunsal.com\n"}}
{"actor":{"display_login":"volkanunsal"}}