{"action":"created","issue":{"url":"https://api.github.com/repos/cgriego/active_attr/issues/155","repository_url":"https://api.github.com/repos/cgriego/active_attr","labels_url":"https://api.github.com/repos/cgriego/active_attr/issues/155/labels{/name}","comments_url":"https://api.github.com/repos/cgriego/active_attr/issues/155/comments","events_url":"https://api.github.com/repos/cgriego/active_attr/issues/155/events","html_url":"https://github.com/cgriego/active_attr/issues/155","id":146398786,"number":155,"title":"Issue when using with responders","user":{"login":"d3crypt3d","id":7327013,"avatar_url":"https://avatars.githubusercontent.com/u/7327013?v=3","gravatar_id":"","url":"https://api.github.com/users/d3crypt3d","html_url":"https://github.com/d3crypt3d","followers_url":"https://api.github.com/users/d3crypt3d/followers","following_url":"https://api.github.com/users/d3crypt3d/following{/other_user}","gists_url":"https://api.github.com/users/d3crypt3d/gists{/gist_id}","starred_url":"https://api.github.com/users/d3crypt3d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d3crypt3d/subscriptions","organizations_url":"https://api.github.com/users/d3crypt3d/orgs","repos_url":"https://api.github.com/users/d3crypt3d/repos","events_url":"https://api.github.com/users/d3crypt3d/events{/privacy}","received_events_url":"https://api.github.com/users/d3crypt3d/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-06T18:37:26Z","updated_at":"2016-04-09T16:16:02Z","closed_at":null,"body":"When I try to use a model instance with responders the controller raises an error: **NoMethodError: undefined method `texts_url'**\r\n```\r\n# app/models/text.rb\r\nclass Text\r\n  include ActiveAttr::Model\r\n\r\n  attribute :plain\r\n  attribute :encrypted\r\n  attribute :frequency\r\nend\r\n\r\n# app/controllers/crypt_controller.rb\r\nclass CryptController < ApplicationController\r\n   respond_to :json\r\n \r\n  def encrypt\r\n    respond_with Text.new(plain: @text, encrypted: output, frequency: frequency_analisys(output)), status: :ok\r\n  end\r\n  # ...\r\nend\r\n```\r\nERROR NoMethodError: undefined method `texts_url' for #<CryptController:0x000000074745f8>\r\n/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/action_dispatch/routing/polymorphic_routes.rb:220:in `polymorphic_method'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/action_dispatch/routing/polymorphic_routes.rb:114:in `polymorphic_url'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/action_dispatch/routing/url_for.rb:164:in `url_for'\r\n"},"comment":{"url":"https://api.github.com/repos/cgriego/active_attr/issues/comments/207814230","html_url":"https://github.com/cgriego/active_attr/issues/155#issuecomment-207814230","issue_url":"https://api.github.com/repos/cgriego/active_attr/issues/155","id":207814230,"user":{"login":"d3crypt3d","id":7327013,"avatar_url":"https://avatars.githubusercontent.com/u/7327013?v=3","gravatar_id":"","url":"https://api.github.com/users/d3crypt3d","html_url":"https://github.com/d3crypt3d","followers_url":"https://api.github.com/users/d3crypt3d/followers","following_url":"https://api.github.com/users/d3crypt3d/following{/other_user}","gists_url":"https://api.github.com/users/d3crypt3d/gists{/gist_id}","starred_url":"https://api.github.com/users/d3crypt3d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d3crypt3d/subscriptions","organizations_url":"https://api.github.com/users/d3crypt3d/orgs","repos_url":"https://api.github.com/users/d3crypt3d/repos","events_url":"https://api.github.com/users/d3crypt3d/events{/privacy}","received_events_url":"https://api.github.com/users/d3crypt3d/received_events","type":"User","site_admin":false},"created_at":"2016-04-09T16:16:02Z","updated_at":"2016-04-09T16:16:02Z","body":"/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/action_dispatch/routing/polymorphic_routes.rb:220:in `polymorphic_method'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/action_dispatch/routing/polymorphic_routes.rb:114:in `polymorphic_url'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/action_dispatch/routing/url_for.rb:164:in `url_for'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/action_controller/metal/rendering.rb:95:in `_process_options'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/action_controller/metal/streaming.rb:200:in `_process_options'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/action_controller/metal/renderers.rb:43:in `block in _render_to_body_with_renderer'\r\n\t/home/workstat/.rvm/rubies/ruby-2.1.4/lib/ruby/2.1.0/set.rb:263:in `each_key'\r\n\t/home/workstat/.rvm/rubies/ruby-2.1.4/lib/ruby/2.1.0/set.rb:263:in `each'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/action_controller/metal/renderers.rb:41:in `_render_to_body_with_renderer'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/action_controller/metal/renderers.rb:37:in `render_to_body'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/abstract_controller/rendering.rb:25:in `render'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/action_controller/metal/rendering.rb:16:in `render'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/action_controller/metal/instrumentation.rb:44:in `block (2 levels) in render'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/activesupport-4.2.5.1/lib/active_support/core_ext/benchmark.rb:12:in `block in ms'\r\n\t/home/workstat/.rvm/rubies/ruby-2.1.4/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/activesupport-4.2.5.1/lib/active_support/core_ext/benchmark.rb:12:in `ms'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/action_controller/metal/instrumentation.rb:44:in `block in render'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/action_controller/metal/instrumentation.rb:87:in `cleanup_view_runtime'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/activerecord-4.2.5.1/lib/active_record/railties/controller_runtime.rb:25:in `cleanup_view_runtime'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/action_controller/metal/instrumentation.rb:43:in `render'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/responders-2.1.1/lib/action_controller/responder.rb:258:in `display'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/responders-2.1.1/lib/action_controller/responder.rb:214:in `api_behavior'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/responders-2.1.1/lib/action_controller/responder.rb:191:in `rescue in to_format'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/responders-2.1.1/lib/action_controller/responder.rb:185:in `to_format'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/responders-2.1.1/lib/action_controller/responder.rb:163:in `respond'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/responders-2.1.1/lib/action_controller/responder.rb:156:in `call'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/responders-2.1.1/lib/action_controller/respond_with.rb:205:in `respond_with'\r\n\t/home/workstat/development/lightit_test_task/caesar_cipher/app/controllers/crypt_controller.rb:20:in `encrypt'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/action_controller/metal/implicit_render.rb:4:in `send_action'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/abstract_controller/base.rb:198:in `process_action'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/action_controller/metal/rendering.rb:10:in `process_action'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:117:in `call'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:117:in `call'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in `call'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in `call'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:92:in `__run_callbacks__'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:778:in `_run_process_action_callbacks'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:81:in `run_callbacks'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/abstract_controller/callbacks.rb:19:in `process_action'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/action_controller/metal/rescue.rb:29:in `process_action'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/activesupport-4.2.5.1/lib/active_support/notifications.rb:164:in `block in instrument'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/activesupport-4.2.5.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/activesupport-4.2.5.1/lib/active_support/notifications.rb:164:in `instrument'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/action_controller/metal/instrumentation.rb:30:in `process_action'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/activerecord-4.2.5.1/lib/active_record/railties/controller_runtime.rb:18:in `process_action'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/abstract_controller/base.rb:137:in `process'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionview-4.2.5.1/lib/action_view/rendering.rb:30:in `process'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/action_controller/metal.rb:196:in `dispatch'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/action_controller/metal.rb:237:in `block in action'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/action_dispatch/routing/route_set.rb:74:in `call'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/action_dispatch/routing/route_set.rb:74:in `dispatch'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/action_dispatch/routing/route_set.rb:43:in `serve'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/action_dispatch/journey/router.rb:43:in `block in serve'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/action_dispatch/journey/router.rb:30:in `each'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/action_dispatch/journey/router.rb:30:in `serve'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/action_dispatch/routing/route_set.rb:815:in `call'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/rack-1.6.4/lib/rack/etag.rb:24:in `call'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/rack-1.6.4/lib/rack/conditionalget.rb:38:in `call'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/rack-1.6.4/lib/rack/head.rb:13:in `call'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/params_parser.rb:27:in `call'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/flash.rb:260:in `call'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:225:in `context'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:220:in `call'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/cookies.rb:560:in `call'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/activerecord-4.2.5.1/lib/active_record/query_cache.rb:36:in `call'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in `call'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:88:in `__run_callbacks__'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:778:in `_run_call_callbacks'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:81:in `run_callbacks'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/callbacks.rb:27:in `call'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/remote_ip.rb:78:in `call'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/railties-4.2.5.1/lib/rails/rack/logger.rb:38:in `call_app'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/railties-4.2.5.1/lib/rails/rack/logger.rb:20:in `block in call'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/activesupport-4.2.5.1/lib/active_support/tagged_logging.rb:68:in `block in tagged'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/activesupport-4.2.5.1/lib/active_support/tagged_logging.rb:26:in `tagged'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/activesupport-4.2.5.1/lib/active_support/tagged_logging.rb:68:in `tagged'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/railties-4.2.5.1/lib/rails/rack/logger.rb:20:in `call'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/request_id.rb:21:in `call'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/rack-1.6.4/lib/rack/methodoverride.rb:22:in `call'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/rack-1.6.4/lib/rack/runtime.rb:18:in `call'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/activesupport-4.2.5.1/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/rack-1.6.4/lib/rack/lock.rb:17:in `call'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/static.rb:116:in `call'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/rack-1.6.4/lib/rack/sendfile.rb:113:in `call'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/railties-4.2.5.1/lib/rails/engine.rb:518:in `call'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/railties-4.2.5.1/lib/rails/application.rb:165:in `call'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/rack-1.6.4/lib/rack/lock.rb:17:in `call'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/rack-1.6.4/lib/rack/content_length.rb:15:in `call'\r\n\t/home/workstat/.rvm/gems/ruby-2.1.4@rails4/gems/rack-1.6.4/lib/rack/handler/webrick.rb:88:in `service'\r\n\t/home/workstat/.rvm/rubies/ruby-2.1.4/lib/ruby/2.1.0/webrick/httpserver.rb:138:in `service'\r\n\t/home/workstat/.rvm/rubies/ruby-2.1.4/lib/ruby/2.1.0/webrick/httpserver.rb:94:in `run'\r\n\t/home/workstat/.rvm/rubies/ruby-2.1.4/lib/ruby/2.1.0/webrick/server.rb:295:in `block in start_thread'\r\n"}}