Sha256: 456db0405bb797ad81a20154c5374bb1a8079efae60e233381a9de0fd7784643

Contents?: true

Size: 767 Bytes

Versions: 6

Compression:

Stored size: 767 Bytes

Contents

= Schematic

* http://github.com/casecommons/schematic/

== DESCRIPTION

Automatic XSD generation for your ActiveRecord models 

== INSTALL

Add schematic to your Gemfile

  gem 'schematic'

Then run:

  $ bundle install

== USAGE
  
  class Post < ActiveRecord::Base
  end

  Post.to_xsd => (a bunch of xml)

You can include additional elements by defining a ".xsd_methods" on your class:

  class Post < ActiveRecord::Base
    def self.xsd_methods
      {:title => nil, :author => [:name, :email, :url]}
    end
  end

You can exclude elements bby defining a ".xsd_ignore_methods" on your class:

  class Post < ActiveRecord::Base
    def self.xsd_ignore_methods
      [:created_at, :updated_at]
    end
  end

== REQUIREMENTS

* ActiveRecord 3.x

== LICENSE

MIT

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
schematic-0.0.8 README.rdoc
schematic-0.0.7 README.rdoc
schematic-0.0.6 README.rdoc
schematic-0.0.5 README.rdoc
schematic-0.0.4 README.rdoc
schematic-0.0.3 README.rdoc