Add LICENSE and update README
This commit is contained in:
parent
8f387a74c9
commit
c3758c0cc7
|
@ -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.
|
15
README.md
15
README.md
|
@ -29,12 +29,12 @@ assuming you have a `Post` model filled with blog posts, and a `PostController`
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
class PostController < ApplicationController
|
class PostController < ApplicationController
|
||||||
respond_to :html, :json, :xml
|
respond_to :html, :json, :xml
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@posts = Post.order('created_at DESC')
|
@posts = Post.order('created_at DESC')
|
||||||
respond_with(@posts)
|
respond_with(@posts)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -211,7 +211,7 @@ Rabl allow you to define easily your templates, even with hierarchy of 2 or 3 le
|
||||||
object :@thread
|
object :@thread
|
||||||
attribute :caption
|
attribute :caption
|
||||||
child :posts do
|
child :posts do
|
||||||
attribute :title
|
attribute :title
|
||||||
child :comments do
|
child :comments do
|
||||||
extends 'comments/base'
|
extends 'comments/base'
|
||||||
end
|
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
|
* [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 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
|
Want to make another change ? Just fork and contribute, any help is very much appreciated
|
||||||
|
|
||||||
## Original idea
|
## 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
|
* [RABL](http://github.com/nesquena/rabl) Standart RABL gem. I used it a lot before deciding I wanted faster views
|
||||||
|
|
||||||
## Copyright
|
## Copyright
|
||||||
|
|
||||||
|
Copyright © 2011-2012 Christopher Cocchi-Perrier. See [LICENSE](http://github.com/ccocchi/rabl-rails/blob/master/LICENSE) for details.
|
||||||
|
|
Loading…
Reference in New Issue