Hello everyone, I’m in the process of converting a php project that I started some time ago to Rails.
I didn’t plan the php project and the code is pretty crappy. A fresh start makes sense to me, and I wanted to do that in Rails and I want to expand the project.
The PHP project is actually just a hashtag system that can categorize images and it currently looks like this.
I’m not that good in Rails and now I want to ask you if my approach is ok so far.
Here is my current build.
rails new \ -d postgresql \ -j webpack \ --skip-test \ HIA-Test cd HIA-Test echo 'gem "devise"' >> Gemfile bundle install rails g devise:install rails generate devise User rails db:migrate git add . && git commit -m "rails new + devise:install" rails g model user_details user_name:string first_name:string last_name:string user:references rails g model picture path:string user:references rails g model hashtag hashtag:string rails g model picture_hashtag hashtag:references picture:references rails g model bookmark picture:references user:references rails db:migrate git add . && git commit -m "models"
I didn’t want to add “user-details” to the “user devise”. That’s why I created an extra table for the user info.
rails g model picture path:string is probably not needed at all. Because of Active Storage. Right? But I need to import from mysql to postgreSQL. I still don’t know how to do that either.
What do you think???
Like I said. I’m not that good at Rails and programming in general. So please don’t be so harsh