Sha256: 1ed2878ae471afd5a790c391d2a9dfd6501a1c0acbee863aa531e952ecb32566

Contents?: true

Size: 766 Bytes

Versions: 17

Compression:

Stored size: 766 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 by 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

17 entries across 17 versions & 1 rubygems

Version Path
schematic-0.3.6 README.rdoc
schematic-0.3.5 README.rdoc
schematic-0.3.4 README.rdoc
schematic-0.3.3 README.rdoc
schematic-0.3.2 README.rdoc
schematic-0.3.1 README.rdoc
schematic-0.3.0 README.rdoc
schematic-0.2.3 README.rdoc
schematic-0.2.1 README.rdoc
schematic-0.1.9 README.rdoc
schematic-0.1.8 README.rdoc
schematic-0.1.7 README.rdoc
schematic-0.1.6 README.rdoc
schematic-0.1.5 README.rdoc
schematic-0.1.4 README.rdoc
schematic-0.1.3 README.rdoc
schematic-0.1.2 README.rdoc