Why do Ruby on Rails professionals NOT use Scaffolding?

后端 未结 8 1277
梦毁少年i
梦毁少年i 2020-12-04 09:59

I read sometimes from people that seem to be working with rails since longer, that one important lesson they learnt would be \"Don\'t use scaffolding\". Also on irc I read c

8条回答
  •  一个人的身影
    2020-12-04 10:22

    I don't use scaffolding for two reasons:

    • Rails scaffolding puts everything in a html tables - I don't like that
    • I prefer to use rails_admin gem for my admin pages so there is no need for 90% of the scaffold code

    Your xml concerns are not the reason why people advise against using scaffolding. I don't bother with XML versions of my pages as it doubles the number of routes your app must generate, which in turn increases the overheads a little...

提交回复
热议问题