I want to obey the Rails RESTful routes approach. I have two kinds of resources:
- data
- repositories
Data belongs to repositories. Unlike a typical ActiveRecord application I don't use HTML forms to create these resources. Instead both entities are serialized in YAML files which I upload to persist them into my database.
Since a small import page does not take up much space and for convenience I would like to put both importer on one page.
+------------------------------+
| <Import Repositories> |
+------------------------------+
+------------------------------+
| Repository A - <Import Data> |
+------------------------------+
| Repository B - <Import Data> |
+------------------------------+
| ... |
But what is the appropriate route in this case here?
Just /repositories/new or something like repositories/data/new ?
How would I go for this, respectively what is the shortest way of defining this in routes.rb. The repositories are moddeled through classes, the data not (to keep it general). So maybe
resource repositories
is just fine?