Sha256: d65674284d91f2c6828402723dd0850488fab598b36e50c5d52f8c31de178972

Contents?: true

Size: 1.85 KB

Versions: 3

Compression:

Stored size: 1.85 KB

Contents

# CanTango Api

The main API for [CanTango](https://github.com/kristianmandrup/cantango)

## Status: Dec 1 2011

The API is being spec'ed...

## Dependencies

This extension depends on the CanTango [core](https://github.com/kristianmandrup/cantango-core) and follows the extension conventions as described there.

## Core extensions

* Macros
  * User
  * Account

These macros allow registration os CanTango User and Account models.

Usage example:

```ruby
class User
	tango_user 
end

class Admin
	tango_user 
end

class UserAccount
	tango_account
end

class AdminAccount
	tango_account
end
```

## Main APIs

The main API consists of the following:

* Ability
* Can
* Model
* Scope
* Session

Each of these have a specific variant for both `Account` and `User`.

### Can API

* Dsl
  * Relation
  * Scope

The Dsl API extends the CanCan Ability API with Relation and Scope APIs.

## Model APIs

* Account
* User

Use by including the `All` module

Usage example: 

```ruby
class User
  include Cantango::Api::User::All
end
```

Note: The `tango_user` and `tango_account` macros should include the relevant All module.

## Contributing to cantango-api
 
* 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 Kristian Mandrup. See LICENSE.txt for
further details.

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cantango-api-0.1.2 README.mdown
cantango-api-0.1.1 README.mdown
cantango-api-0.1.0 README.mdown