07 Jul '12, 6am

@chikaram RailsならActiveSupportのObject#tryが便利です

railties/lib/rails/test_help.rb railties/lib/rails/commands/benchmarker.rb railties/lib/rails/commands/profiler.rb railties/lib/rails/commands/plugin.rb actionpack/lib/action_controller/deprecated/performance_test.rb actionpack/lib/action_controller/deprecated/integration_test.rb actionpack/lib/action_controller/deprecated.rb actionpack/lib/action_dispatch/http/mime_types.rb activesupport/lib/active_support/hash_with_indifferent_access.rb activesupport/lib/active_support/xml_mini/jdom.rb activesupport/lib/active_support/core_ext/string/output_safety.rb activesupport/lib/active_support/core_ext/uri.rb activesupport/lib/active_support/core_ext/load_error.rb activesupport/lib/active_support/core_ext/object/to_json.rb activesupport/lib/active_support/core_ext/object/with_options.rb activesupport/lib/active_support/core_ext/object/try.rb activesupport/lib/active_support/core_ex...

Full article: http://api.rubyonrails.org/classes/Object.html#method-i-try

Tweets

самый полезный метод в rails состоит из 1 строчки

api.rubyonrails.org 28 Jun '12, 7am

railties/lib/rails/test_help.rb railties/lib/rails/commands/benchmarker.rb railties/lib/rails/commands/profiler.rb railtie...