Skip to content

Instantly share code, notes, and snippets.

@thehydroimpulse
Last active August 29, 2015 14:05
#[phase(plugin)]
extern crate resource_macros;
extern crate resource;
use resource::Resource;
resource! {
table "users"
attr username: String (validate presence, email)
attr password: String (validate presence)
attr skills: Vec<String>
}
fn main() {
Resource::new("user").find(10);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment