Sha256: 95d1faeb7b75905ec449d6c6ab4f216c8046f594170fd64c739dd327195d3297
Contents?: true
Size: 1.8 KB
Versions: 22
Compression:
Stored size: 1.8 KB
Contents
= logical_model LogicalModel allows to use a restfull resources as models. It was written following this tutorial: http://www.slideshare.net/ihower/serviceoriented-design-and-implement-with-rails3 == Assumptions LogicalModel makes some assumptions about the service you'll be consuming * resource service is RESTfull * INDEX response is { collection: [resources...], total: total items } * SHOW response is { .... resource attributes ... } * CREATE response on success is { id: created_id } * CREATE response on failure is { message: 'error message', error_codes: [], errors: attribute_errors } * UPDATE response on success is "OK" * UPDATE response on failure is { message: 'error message', error_codes: [], errors: attribute_errors } * DESTROY response is "ok" == Usage In your Gemfile: gem "logical_model" == Testing To run spec: bundle exec rake == Contributing to logical_model * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it * Fork the project * Start a feature/bugfix branch * Commit and push until you are happy with your contribution * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally. * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it. == Copyright Copyright (c) 2011,2012 Dwayne Macgowan. See LICENSE.txt for further details. === TODO * put log in /log * on create parse response and show errors, etc.
Version data entries
22 entries across 22 versions & 1 rubygems