Best practice for structuring a 'large' Rails app

后端 未结 6 433
情深已故
情深已故 2021-01-30 18:27

My question here is seeking best practice, general advice and insight, rather than a solution to a specific problem.

I am in the early stages of planning out a Rails pro

6条回答
  •  南笙
    南笙 (楼主)
    2021-01-30 19:06

    The biggest issue I see with separating into several apps is that you lose flexibility. What happens if, in the future, a previously administrative task (eg. uploading a type of file) becomes a "user task"? You would have to be moving code from one application to the other.

    I'd keep everything on single application - and use roles for filtering what each user can see and do. It might be a bit more difficult at the begining, but it pays up in the near future.

    Have a look at authorization frameworks, such as declarative_authorization or cancan.

提交回复
热议问题