Skip to content

dariusf/minimal-squeel-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minimal example

The following will create two achievments, with achievement 2 having achievement 1 as a condition, when run in irb:

Achievement.new.tap do |a|
  a.id = 1
  a.title = 'one'
end.save
Achievement.new.tap do |a|
  a.id = 2
  a.title = 'two'
end.save
Condition.new.tap do |c|
  c.id = 1
  c.actable_id = 1
  c.actable_type = 'AchievementCondition'
  c.conditional_id = 2
  c.conditional_type = 'Achievement'
end.save
AchievementCondition.new.tap do |a|
  a.id = 1
  a.achievement_id = 1
end.save

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published