Last active
August 29, 2015 14:05
-
-
Save thehydroimpulse/cbe863cafe77aeb8849c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[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