Skip to content

slashdotdash/rcqrs-rails

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
lib
 
 
 
 
 
 
 
 
 
 

RCQRS Rails 3 Plugin

Use the RCQRS library in your Rails 3 web app.

Usage

Add the following dependencies to your Rails app's Gemfile and then sudo bundle install

gem "uuidtools"
gem "yajl-ruby", :require => 'yajl'
gem "eventful"
gem "rcqrs"
gem "rcqrs-rails"

Add the following snippet inside application_controller.rb (ensuring it is protected) to allow each of your controllers to publish commands.

def publish(command)
  Rcqrs::Gateway.publish(command)
end

Create a yaml config file with your event storage configuration named config/event_storage.yml (or copy the example in example/event_storage.yml).

##Generators

This plugin provides three generators to ease common tasks for generating commands, events and controllers using the CQRS pattern.

  • rcqrs:command
  • rcqrs:controller
  • rcqrs:event

Usage is rails generate rcqrs:command <command name>

About

Rails 3 plugin to use the RCQRS library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages