Best way to start a rails project?
Hi i've been coding with rails selflearning with videos books and so on, (prolly not the best way to do it) but i'm wondering if there are few best practices to follow up.
For instance, when i do start a new project i spend lot of time cheching if it's worth or not to do gems for authentication, maybe in the future are obsolete or non supported? or when rails 6 arrives then code will break and maybe not being able to fix it?
is better to start with the models then the controllers? not sure if youll understandme :) but thanks for reading :D
I would definitely recommend using Devise for authentication for several reasons.
1) You're more likely to have security issues if you build authentication yourself
2) Devise has lots of users so they find security problems, but only hackers and yourself will be testing yours
3) Devise gets lots of updates for new versions of Rails, etc because of how many people in the community use it
I typically start with models and then create controllers. You want to have your database designed correctly before you implement your controllers. Since they are deciding how data gets saved, you need your models setup so they have somewhere to save.
Consider starting with rails 6 beta if you don't plan to release before summer. Beta has been rock solid for me and Basecamp has been using it in production.
thanks Matt, i'll give it a try
by now i'm trying to have a good start planning in advance models and features i want to implement.
Just tryied to start with rails 6 beta 2, but i'm using Aws cloud9 and sqlite 3.8 (requiered by rails) is not installed, and havent been able yet to install / upgrade version. :/