« Back to blog

Now on edge: easier relations in scaffold generation

Until now, when you created a ubiquo_scaffold, and you wanted to indicate relations from the command line, you had to eiher manually add any xx_id field in the migration after creating the ubiquo_scaffold (and before running the migration), or, if you added it as another field, you had to remove it later from the views.

Both options were repetitive and annoying to the developer. So we changed it. Now you can create three scaffolds just like this:

script/generate ubiquo_scaffold Book name:string --belongs-to author

script/generate ubiquo_scaffold Author name:string --has_many books --belongs_to country

script/generate ubiquo_scaffold Country name:string --has_many authors

Then simply go to ubiquo and you will find the scaffolds as you would expect: with relation selectors, and without any xx_id field in the views.

 

Comments (0)

Leave a comment...