Newbie learning Rails and about to undertake my first real app. Please
with me, I’ll try not to be long winded.
It’s a blogging app where blogs belong to organizations, not users. An
organization can have many blogs, a blog can have many admins, and many
subscribers. There can be many organizations.
My many objects are: Organization, User, Blog, BlogSubscription (this is
joiner table association a blog with a user)
An Organization has many blogs and belongs to a user
A User has many BlogSubscriptions and (has one or has many–yet to be
A Blog belongs to an organization
I’m thinking of having two sign up processes. A) for organizations, B)
ordinary users who subscribe to blogs
So for sign-up A: User signs up and the app creates the user object and
Organization object attached to the user. This is an account-level
For sign-up B: User finds a blog and subscribes, or signs-in/signs-up
subscribes. This is a user level object.
I’m afraid that the way I plan to go about might give me a headache.
- Roles. How to implement role based security and authorization.
- Login. Should I roll my own or use something like Devise with
- Organization level subdomain. So James signs up and creates an
Organization, which should map to smiths.myapp.com
The closest real life app I can think of is UserVoice. I would
any guidance, tips, or resources by anyone who has some knowledge or
experience developing a similar app. I’m having a particularly hard time
modeling my data.