From c3758c0cc785f73d95153a67b527d80be8b8dd57 Mon Sep 17 00:00:00 2001 From: ccocchi Date: Mon, 23 Jul 2012 18:29:36 +0200 Subject: [PATCH] Add LICENSE and update README --- LICENSE | 20 ++++++++++++++++++++ README.md | 15 ++++++++------- 2 files changed, 28 insertions(+), 7 deletions(-) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..c752847 --- /dev/null +++ b/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2010 Christopher Cocchi-Perrier + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index 4bbc517..e67a553 100644 --- a/README.md +++ b/README.md @@ -29,12 +29,12 @@ assuming you have a `Post` model filled with blog posts, and a `PostController` ```ruby class PostController < ApplicationController - respond_to :html, :json, :xml + respond_to :html, :json, :xml - def index - @posts = Post.order('created_at DESC') - respond_with(@posts) - end + def index + @posts = Post.order('created_at DESC') + respond_with(@posts) + end end ``` @@ -211,7 +211,7 @@ Rabl allow you to define easily your templates, even with hierarchy of 2 or 3 le object :@thread attribute :caption child :posts do - attribute :title + attribute :title child :comments do extends 'comments/base' end @@ -237,7 +237,6 @@ And caching each object in a collection can be really not effective with big col * [Christopher Cocchi-Perrier](http://github.com/ccocchi) - Creator of the project Want to add another format to Rabl-rails ? Checkout [JSON renderer](http://github.com/ccocchi/rabl-rails/blob/master/lib/rabl-rails/renderers/json.rb) for reference - Want to make another change ? Just fork and contribute, any help is very much appreciated ## Original idea @@ -245,3 +244,5 @@ Want to make another change ? Just fork and contribute, any help is very much ap * [RABL](http://github.com/nesquena/rabl) Standart RABL gem. I used it a lot before deciding I wanted faster views ## Copyright + +Copyright © 2011-2012 Christopher Cocchi-Perrier. See [LICENSE](http://github.com/ccocchi/rabl-rails/blob/master/LICENSE) for details.