Skip to content

Instantly share code, notes, and snippets.

@thehydroimpulse
Last active August 29, 2015 14:05
Show Gist options
  • Save thehydroimpulse/cbe863cafe77aeb8849c to your computer and use it in GitHub Desktop.
Save thehydroimpulse/cbe863cafe77aeb8849c to your computer and use it in GitHub Desktop.
#[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