Created
July 5, 2013 19:48
-
-
Save mwlang/5936802 to your computer and use it in GitHub Desktop.
A Status class that isn't persisted to the DB.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| activerecord (4.0.0) lib/active_record/associations/association_scope.rb:13:in `initialize' | |
| activerecord (4.0.0) lib/active_record/associations/association.rb:100:in `new' | |
| activerecord (4.0.0) lib/active_record/associations/association.rb:100:in `association_scope' | |
| activerecord (4.0.0) lib/active_record/associations/association.rb:84:in `scope' | |
| activerecord (4.0.0) lib/active_record/associations/singular_association.rb:42:in `find_target' | |
| activerecord (4.0.0) lib/active_record/associations/association.rb:139:in `load_target' | |
| activerecord (4.0.0) lib/active_record/associations/association.rb:52:in `reload' | |
| activerecord (4.0.0) lib/active_record/associations/singular_association.rb:9:in `reader' | |
| activerecord (4.0.0) lib/active_record/associations/builder/association.rb:70:in `status' | |
| formtastic (2.2.1) lib/formtastic/inputs/base/fileish.rb:9:in `block in file?' | |
| formtastic (2.2.1) lib/formtastic/inputs/base/fileish.rb:9:in `each' | |
| formtastic (2.2.1) lib/formtastic/inputs/base/fileish.rb:9:in `any?' | |
| formtastic (2.2.1) lib/formtastic/inputs/base/fileish.rb:9:in `file?' | |
| formtastic (2.2.1) lib/formtastic/inputs/base/errors.rb:49:in `error_keys' | |
| formtastic (2.2.1) lib/formtastic/inputs/base/errors.rb:40:in `errors' | |
| formtastic (2.2.1) lib/formtastic/inputs/base/errors.rb:34:in `errors?' | |
| formtastic (2.2.1) lib/formtastic/inputs/base/errors.rb:7:in `error_html' | |
| formtastic (2.2.1) lib/formtastic/inputs/base/wrapping.rb:11:in `input_wrapping' | |
| formtastic (2.2.1) lib/formtastic/inputs/select_input.rb:146:in `to_html' | |
| formtastic (2.2.1) lib/formtastic/helpers/input_helper.rb:240:in `input' | |
| /Users/mwlang/.rvm/gems/ruby-2.0.0-p0/bundler/gems/active_admin-51a5a72974ba/lib/active_admin/form_builder.rb:19:in `block in input' | |
| /Users/mwlang/.rvm/gems/ruby-2.0.0-p0/bundler/gems/active_admin-51a5a72974ba/lib/active_admin/form_builder.rb:175:in `with_new_form_buffer' | |
| /Users/mwlang/.rvm/gems/ruby-2.0.0-p0/bundler/gems/active_admin-51a5a72974ba/lib/active_admin/form_builder.rb:19:in `input' | |
| /Users/mwlang/.rvm/gems/ruby-2.0.0-p0/bundler/gems/active_admin-51a5a72974ba/lib/active_admin/form_builder.rb:168:in `block in field_set_and_list_wrapping' | |
| actionpack (4.0.0) lib/action_view/helpers/capture_helper.rb:38:in `block in capture' | |
| actionpack (4.0.0) lib/action_view/helpers/capture_helper.rb:200:in `with_output_buffer' | |
| haml (4.0.3) lib/haml/helpers/action_view_xss_mods.rb:5:in `with_output_buffer_with_haml_xss' | |
| actionpack (4.0.0) lib/action_view/helpers/capture_helper.rb:38:in `capture' | |
| haml (4.0.3) lib/haml/helpers/action_view_mods.rb:59:in `capture_with_haml' | |
| formtastic (2.2.1) lib/formtastic/helpers/fieldset_wrapper.rb:32:in `field_set_and_list_wrapping' | |
| /Users/mwlang/.rvm/gems/ruby-2.0.0-p0/bundler/gems/active_admin-51a5a72974ba/lib/active_admin/form_builder.rb:168:in `field_set_and_list_wrapping' | |
| formtastic (2.2.1) lib/formtastic/helpers/inputs_helper.rb:292:in `inputs' | |
| /Users/mwlang/.rvm/gems/ruby-2.0.0-p0/bundler/gems/active_admin-51a5a72974ba/lib/active_admin/form_builder.rb:13:in `block in inputs' | |
| /Users/mwlang/.rvm/gems/ruby-2.0.0-p0/bundler/gems/active_admin-51a5a72974ba/lib/active_admin/form_builder.rb:175:in `with_new_form_buffer' | |
| /Users/mwlang/.rvm/gems/ruby-2.0.0-p0/bundler/gems/active_admin-51a5a72974ba/lib/active_admin/form_builder.rb:13:in `inputs' | |
| /Users/mwlang/.rvm/gems/ruby-2.0.0-p0/bundler/gems/active_admin-51a5a72974ba/lib/active_admin/views/pages/form.rb:23:in `instance_exec' | |
| /Users/mwlang/.rvm/gems/ruby-2.0.0-p0/bundler/gems/active_admin-51a5a72974ba/lib/active_admin/views/pages/form.rb:23:in `block in main_content' | |
| actionpack (4.0.0) lib/action_view/helpers/capture_helper.rb:38:in `block in capture' | |
| actionpack (4.0.0) lib/action_view/helpers/capture_helper.rb:200:in `with_output_buffer' | |
| haml (4.0.3) lib/haml/helpers/action_view_xss_mods.rb:5:in `with_output_buffer_with_haml_xss' | |
| actionpack (4.0.0) lib/action_view/helpers/capture_helper.rb:38:in `capture' | |
| haml (4.0.3) lib/haml/helpers/action_view_mods.rb:59:in `capture_with_haml' | |
| actionpack (4.0.0) lib/action_view/helpers/form_helper.rb:435:in `form_for' | |
| haml (4.0.3) lib/haml/helpers/action_view_mods.rb:146:in `form_for_with_haml' | |
| haml (4.0.3) lib/haml/helpers/action_view_xss_mods.rb:28:in `form_for_with_haml_xss' | |
| formtastic (2.2.1) lib/formtastic/helpers/form_helper.rb:161:in `block in semantic_form_for' | |
| formtastic (2.2.1) lib/formtastic/helpers/form_helper.rb:192:in `with_custom_field_error_proc' | |
| formtastic (2.2.1) lib/formtastic/helpers/form_helper.rb:160:in `semantic_form_for' | |
| /Users/mwlang/.rvm/gems/ruby-2.0.0-p0/bundler/gems/active_admin-51a5a72974ba/lib/active_admin/view_helpers/form_helper.rb:13:in `active_admin_form_for' | |
| arbre (1.0.1) lib/arbre/element.rb:175:in `method_missing' | |
| /Users/mwlang/.rvm/gems/ruby-2.0.0-p0/bundler/gems/active_admin-51a5a72974ba/lib/active_admin/views/pages/form.rb:22:in `main_content' | |
| /Users/mwlang/.rvm/gems/ruby-2.0.0-p0/bundler/gems/active_admin-51a5a72974ba/lib/active_admin/views/pages/base.rb:78:in `block (2 levels) in build_main_content_wrapper' | |
| arbre (1.0.1) lib/arbre/element/builder_methods.rb:31:in `block in build_tag' | |
| arbre (1.0.1) lib/arbre/context.rb:92:in `with_current_arbre_element' | |
| arbre (1.0.1) lib/arbre/element/builder_methods.rb:49:in `with_current_arbre_element' | |
| arbre (1.0.1) lib/arbre/element/builder_methods.rb:26:in `build_tag' | |
| arbre (1.0.1) lib/arbre/element/builder_methods.rb:39:in `insert_tag' | |
| arbre (1.0.1) lib/arbre/element/builder_methods.rb:14:in `div' | |
| /Users/mwlang/.rvm/gems/ruby-2.0.0-p0/bundler/gems/active_admin-51a5a72974ba/lib/active_admin/views/pages/base.rb:77:in `block in build_main_content_wrapper' | |
| arbre (1.0.1) lib/arbre/element/builder_methods.rb:31:in `block in build_tag' | |
| arbre (1.0.1) lib/arbre/context.rb:92:in `with_current_arbre_element' | |
| arbre (1.0.1) lib/arbre/element/builder_methods.rb:49:in `with_current_arbre_element' | |
| arbre (1.0.1) lib/arbre/element/builder_methods.rb:26:in `build_tag' | |
| arbre (1.0.1) lib/arbre/element/builder_methods.rb:39:in `insert_tag' | |
| arbre (1.0.1) lib/arbre/element/builder_methods.rb:14:in `div' | |
| /Users/mwlang/.rvm/gems/ruby-2.0.0-p0/bundler/gems/active_admin-51a5a72974ba/lib/active_admin/views/pages/base.rb:76:in `build_main_content_wrapper' | |
| /Users/mwlang/.rvm/gems/ruby-2.0.0-p0/bundler/gems/active_admin-51a5a72974ba/lib/active_admin/views/pages/base.rb:60:in `block in build_page_content' | |
| arbre (1.0.1) lib/arbre/element/builder_methods.rb:31:in `block in build_tag' | |
| arbre (1.0.1) lib/arbre/context.rb:92:in `with_current_arbre_element' | |
| arbre (1.0.1) lib/arbre/element/builder_methods.rb:49:in `with_current_arbre_element' | |
| arbre (1.0.1) lib/arbre/element/builder_methods.rb:26:in `build_tag' | |
| arbre (1.0.1) lib/arbre/element/builder_methods.rb:39:in `insert_tag' | |
| arbre (1.0.1) lib/arbre/element/builder_methods.rb:14:in `div' | |
| /Users/mwlang/.rvm/gems/ruby-2.0.0-p0/bundler/gems/active_admin-51a5a72974ba/lib/active_admin/views/pages/base.rb:59:in `build_page_content' | |
| /Users/mwlang/.rvm/gems/ruby-2.0.0-p0/bundler/gems/active_admin-51a5a72974ba/lib/active_admin/views/pages/base.rb:42:in `block (2 levels) in build_page' | |
| arbre (1.0.1) lib/arbre/element/builder_methods.rb:31:in `block in build_tag' | |
| arbre (1.0.1) lib/arbre/context.rb:92:in `with_current_arbre_element' | |
| arbre (1.0.1) lib/arbre/element/builder_methods.rb:49:in `with_current_arbre_element' | |
| arbre (1.0.1) lib/arbre/element/builder_methods.rb:26:in `build_tag' | |
| arbre (1.0.1) lib/arbre/element/builder_methods.rb:39:in `insert_tag' | |
| arbre (1.0.1) lib/arbre/element/builder_methods.rb:14:in `div' | |
| /Users/mwlang/.rvm/gems/ruby-2.0.0-p0/bundler/gems/active_admin-51a5a72974ba/lib/active_admin/views/pages/base.rb:39:in `block in build_page' | |
| arbre (1.0.1) lib/arbre/context.rb:92:in `with_current_arbre_element' | |
| arbre (1.0.1) lib/arbre/element/builder_methods.rb:49:in `with_current_arbre_element' | |
| /Users/mwlang/.rvm/gems/ruby-2.0.0-p0/bundler/gems/active_admin-51a5a72974ba/lib/active_admin/views/pages/base.rb:38:in `build_page' | |
| /Users/mwlang/.rvm/gems/ruby-2.0.0-p0/bundler/gems/active_admin-51a5a72974ba/lib/active_admin/views/pages/base.rb:10:in `build' | |
| arbre (1.0.1) lib/arbre/element/builder_methods.rb:30:in `block in build_tag' | |
| arbre (1.0.1) lib/arbre/context.rb:92:in `with_current_arbre_element' | |
| arbre (1.0.1) lib/arbre/element/builder_methods.rb:26:in `build_tag' | |
| arbre (1.0.1) lib/arbre/element/builder_methods.rb:39:in `insert_tag' | |
| /Users/mwlang/.rvm/gems/ruby-2.0.0-p0/bundler/gems/active_admin-51a5a72974ba/app/views/active_admin/resource/edit.html.arb:1:in `block in ___sers_mwlang__rvm_gems_ruby_______p__bundler_gems_active_admin___a_a_____ba_app_views_active_admin_resource_edit_html_arb__2257483336016546230_70292092910180' | |
| arbre (1.0.1) lib/arbre/context.rb:45:in `instance_eval' | |
| arbre (1.0.1) lib/arbre/context.rb:45:in `initialize' | |
| /Users/mwlang/.rvm/gems/ruby-2.0.0-p0/bundler/gems/active_admin-51a5a72974ba/app/views/active_admin/resource/edit.html.arb:1:in `new' | |
| /Users/mwlang/.rvm/gems/ruby-2.0.0-p0/bundler/gems/active_admin-51a5a72974ba/app/views/active_admin/resource/edit.html.arb:1:in `___sers_mwlang__rvm_gems_ruby_______p__bundler_gems_active_admin___a_a_____ba_app_views_active_admin_resource_edit_html_arb__2257483336016546230_70292092910180' | |
| actionpack (4.0.0) lib/action_view/template.rb:143:in `block in render' | |
| activesupport (4.0.0) lib/active_support/notifications.rb:161:in `instrument' | |
| actionpack (4.0.0) lib/action_view/template.rb:141:in `render' | |
| actionpack (4.0.0) lib/action_view/renderer/template_renderer.rb:49:in `block (2 levels) in render_template' | |
| actionpack (4.0.0) lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument' | |
| activesupport (4.0.0) lib/active_support/notifications.rb:159:in `block in instrument' | |
| activesupport (4.0.0) lib/active_support/notifications/instrumenter.rb:20:in `instrument' | |
| activesupport (4.0.0) lib/active_support/notifications.rb:159:in `instrument' | |
| actionpack (4.0.0) lib/action_view/renderer/abstract_renderer.rb:38:in `instrument' | |
| actionpack (4.0.0) lib/action_view/renderer/template_renderer.rb:48:in `block in render_template' | |
| actionpack (4.0.0) lib/action_view/renderer/template_renderer.rb:56:in `render_with_layout' | |
| actionpack (4.0.0) lib/action_view/renderer/template_renderer.rb:47:in `render_template' | |
| actionpack (4.0.0) lib/action_view/renderer/template_renderer.rb:17:in `render' | |
| actionpack (4.0.0) lib/action_view/renderer/renderer.rb:42:in `render_template' | |
| actionpack (4.0.0) lib/action_view/renderer/renderer.rb:23:in `render' | |
| actionpack (4.0.0) lib/abstract_controller/rendering.rb:127:in `_render_template' | |
| actionpack (4.0.0) lib/action_controller/metal/streaming.rb:219:in `_render_template' | |
| actionpack (4.0.0) lib/abstract_controller/rendering.rb:120:in `render_to_body' | |
| actionpack (4.0.0) lib/action_controller/metal/rendering.rb:33:in `render_to_body' | |
| actionpack (4.0.0) lib/action_controller/metal/renderers.rb:26:in `render_to_body' | |
| actionpack (4.0.0) lib/abstract_controller/rendering.rb:97:in `render' | |
| actionpack (4.0.0) lib/action_controller/metal/rendering.rb:16:in `render' | |
| actionpack (4.0.0) lib/action_controller/metal/instrumentation.rb:41:in `block (2 levels) in render' | |
| activesupport (4.0.0) lib/active_support/core_ext/benchmark.rb:12:in `block in ms' | |
| /Users/mwlang/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/benchmark.rb:296:in `realtime' | |
| activesupport (4.0.0) lib/active_support/core_ext/benchmark.rb:12:in `ms' | |
| actionpack (4.0.0) lib/action_controller/metal/instrumentation.rb:41:in `block in render' | |
| actionpack (4.0.0) lib/action_controller/metal/instrumentation.rb:84:in `cleanup_view_runtime' | |
| activerecord (4.0.0) lib/active_record/railties/controller_runtime.rb:25:in `cleanup_view_runtime' | |
| actionpack (4.0.0) lib/action_controller/metal/instrumentation.rb:40:in `render' | |
| wicked_pdf (0.9.6) lib/pdf_helper.rb:23:in `render_with_wicked_pdf' | |
| /Users/mwlang/.rvm/gems/ruby-2.0.0-p0/bundler/gems/active_admin-51a5a72974ba/lib/active_admin/resource_controller/actions.rb:42:in `block (2 levels) in edit' | |
| actionpack (4.0.0) lib/action_controller/metal/responder.rb:231:in `call' | |
| actionpack (4.0.0) lib/action_controller/metal/responder.rb:231:in `default_render' | |
| actionpack (4.0.0) lib/action_controller/metal/responder.rb:161:in `to_html' | |
| responders (1.0.0.rc) lib/responders/flash_responder.rb:104:in `to_html' | |
| actionpack (4.0.0) lib/action_controller/metal/responder.rb:154:in `respond' | |
| actionpack (4.0.0) lib/action_controller/metal/responder.rb:147:in `call' | |
| actionpack (4.0.0) lib/action_controller/metal/mime_responds.rb:330:in `respond_with' | |
| /Users/mwlang/.rvm/gems/ruby-2.0.0-p0/bundler/gems/inherited_resources-2656ca0cea51/lib/inherited_resources/actions.rb:25:in `edit' | |
| /Users/mwlang/.rvm/gems/ruby-2.0.0-p0/bundler/gems/active_admin-51a5a72974ba/lib/active_admin/resource_controller/actions.rb:40:in `edit' | |
| actionpack (4.0.0) lib/action_controller/metal/implicit_render.rb:4:in `send_action' | |
| actionpack (4.0.0) lib/abstract_controller/base.rb:189:in `process_action' | |
| actionpack (4.0.0) lib/action_controller/metal/rendering.rb:10:in `process_action' | |
| actionpack (4.0.0) lib/abstract_controller/callbacks.rb:18:in `block in process_action' | |
| activesupport (4.0.0) lib/active_support/callbacks.rb:423:in `_run__3387350931161919848__process_action__callbacks' | |
| activesupport (4.0.0) lib/active_support/callbacks.rb:80:in `run_callbacks' | |
| actionpack (4.0.0) lib/abstract_controller/callbacks.rb:17:in `process_action' | |
| actionpack (4.0.0) lib/action_controller/metal/rescue.rb:29:in `process_action' | |
| actionpack (4.0.0) lib/action_controller/metal/instrumentation.rb:31:in `block in process_action' | |
| activesupport (4.0.0) lib/active_support/notifications.rb:159:in `block in instrument' | |
| activesupport (4.0.0) lib/active_support/notifications/instrumenter.rb:20:in `instrument' | |
| activesupport (4.0.0) lib/active_support/notifications.rb:159:in `instrument' | |
| actionpack (4.0.0) lib/action_controller/metal/instrumentation.rb:30:in `process_action' | |
| actionpack (4.0.0) lib/action_controller/metal/params_wrapper.rb:245:in `process_action' | |
| activerecord (4.0.0) lib/active_record/railties/controller_runtime.rb:18:in `process_action' | |
| actionpack (4.0.0) lib/abstract_controller/base.rb:136:in `process' | |
| actionpack (4.0.0) lib/abstract_controller/rendering.rb:44:in `process' | |
| actionpack (4.0.0) lib/action_controller/metal.rb:195:in `dispatch' | |
| actionpack (4.0.0) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch' | |
| actionpack (4.0.0) lib/action_controller/metal.rb:231:in `block in action' | |
| actionpack (4.0.0) lib/action_dispatch/routing/route_set.rb:80:in `call' | |
| actionpack (4.0.0) lib/action_dispatch/routing/route_set.rb:80:in `dispatch' | |
| actionpack (4.0.0) lib/action_dispatch/routing/route_set.rb:48:in `call' | |
| actionpack (4.0.0) lib/action_dispatch/journey/router.rb:71:in `block in call' | |
| actionpack (4.0.0) lib/action_dispatch/journey/router.rb:59:in `each' | |
| actionpack (4.0.0) lib/action_dispatch/journey/router.rb:59:in `call' | |
| actionpack (4.0.0) lib/action_dispatch/routing/route_set.rb:655:in `call' | |
| warden (1.2.1) lib/warden/manager.rb:35:in `block in call' | |
| warden (1.2.1) lib/warden/manager.rb:34:in `catch' | |
| warden (1.2.1) lib/warden/manager.rb:34:in `call' | |
| rack (1.5.2) lib/rack/etag.rb:23:in `call' | |
| rack (1.5.2) lib/rack/conditionalget.rb:25:in `call' | |
| rack (1.5.2) lib/rack/head.rb:11:in `call' | |
| actionpack (4.0.0) lib/action_dispatch/middleware/params_parser.rb:27:in `call' | |
| actionpack (4.0.0) lib/action_dispatch/middleware/flash.rb:241:in `call' | |
| rack (1.5.2) lib/rack/session/abstract/id.rb:225:in `context' | |
| rack (1.5.2) lib/rack/session/abstract/id.rb:220:in `call' | |
| actionpack (4.0.0) lib/action_dispatch/middleware/cookies.rb:486:in `call' | |
| activerecord (4.0.0) lib/active_record/query_cache.rb:36:in `call' | |
| activerecord (4.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:626:in `call' | |
| activerecord (4.0.0) lib/active_record/migration.rb:369:in `call' | |
| actionpack (4.0.0) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call' | |
| activesupport (4.0.0) lib/active_support/callbacks.rb:373:in `_run__3236581604269930909__call__callbacks' | |
| activesupport (4.0.0) lib/active_support/callbacks.rb:80:in `run_callbacks' | |
| actionpack (4.0.0) lib/action_dispatch/middleware/callbacks.rb:27:in `call' | |
| actionpack (4.0.0) lib/action_dispatch/middleware/reloader.rb:64:in `call' | |
| actionpack (4.0.0) lib/action_dispatch/middleware/remote_ip.rb:76:in `call' | |
| actionpack (4.0.0) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call' | |
| actionpack (4.0.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call' | |
| railties (4.0.0) lib/rails/rack/logger.rb:38:in `call_app' | |
| railties (4.0.0) lib/rails/rack/logger.rb:21:in `block in call' | |
| activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `block in tagged' | |
| activesupport (4.0.0) lib/active_support/tagged_logging.rb:25:in `tagged' | |
| activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `tagged' | |
| railties (4.0.0) lib/rails/rack/logger.rb:21:in `call' | |
| actionpack (4.0.0) lib/action_dispatch/middleware/request_id.rb:21:in `call' | |
| rack (1.5.2) lib/rack/methodoverride.rb:21:in `call' | |
| rack (1.5.2) lib/rack/runtime.rb:17:in `call' | |
| activesupport (4.0.0) lib/active_support/cache/strategy/local_cache.rb:83:in `call' | |
| rack (1.5.2) lib/rack/lock.rb:17:in `call' | |
| actionpack (4.0.0) lib/action_dispatch/middleware/static.rb:64:in `call' | |
| railties (4.0.0) lib/rails/engine.rb:511:in `call' | |
| railties (4.0.0) lib/rails/application.rb:97:in `call' | |
| rack (1.5.2) lib/rack/lock.rb:17:in `call' | |
| rack (1.5.2) lib/rack/content_length.rb:14:in `call' | |
| rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service' | |
| /Users/mwlang/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service' | |
| /Users/mwlang/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run' | |
| /Users/mwlang/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Status | |
| include ActiveModel::Conversion | |
| extend ActiveModel::Naming | |
| def persisted? | |
| false | |
| end | |
| def to_param | |
| self.id | |
| end | |
| attr_accessor :id, :name | |
| def initialize(attributes = {}) | |
| attributes.each do |name, value| | |
| send("#{name}=", value) | |
| end | |
| end | |
| def symbol | |
| @name.to_s.downcase.intern | |
| end | |
| def self.[](value) | |
| @@statuses.select { |status| status.symbol == value.to_s.downcase.intern }.first | |
| end | |
| def self.find(id) | |
| @@statuses.detect { |status| status.id.to_s == id.to_s } | |
| end | |
| def self.find_all | |
| @@statuses.dup | |
| end | |
| @@statuses = [ | |
| Status.new(:id => 1, :name => 'Draft' ), | |
| Status.new(:id => 100, :name => 'Published'), | |
| Status.new(:id => 101, :name => 'Hidden' ) | |
| ] | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment