Created
May 19, 2016 08:00
-
-
Save kubakrzempek/c094565d8bb6ff4850e0d80c19b8fa62 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
facts = [ | |
{ | |
fact_category: { | |
name: "Cars", | |
code: "cars", | |
protected: false, | |
enabled: true, | |
system: true, | |
fact_types: [ | |
{ | |
code: "st", | |
name: "station codes", | |
fact_values: [], | |
}, | |
], | |
}, | |
} | |
] | |
create_command = WheelsApp.instance["persistence"].command.create(fact_category: :fact_categories) do |fact_category| | |
fact_category.create(fact_type: :fact_types) do |fact_type| | |
fact_type.create(:fact_values) | |
end | |
end | |
create_command.call(facts[0]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment