opensource rails API only app for community events
REFRENCE: https://medium.com/otavio-henrique/creating-simple-rest-api-with-rails-5-1ba71b37cad
rails new library --api -d postgresql -T
group :development, :test do gem 'rspec-rails', '~> 3.6' end
gem 'factory_girl'
gem 'versionist'
rails db:create
rails s
rails generate versionist:new_api_version v1 V1 --path=value:v1
rails g model Product name:string description:text amount:integer admin:references
resources :books
rails g controller super_admin/admin index show new create edit update destroy
rails g model Product name:string description:text amount:integer admin:references
rails generate migration RemoveAdminIdFromAnimals admin_id:bigint
rails generate migration add_email_to_users email:string
rename_column :table, :old_column, :new_column
products = Product.joins(:types)
def change remove_column :payments, :date add_column :payments, :date, :datetime end
Rails ERD - Generate Entity-Relationship Diagrams for Rails applications https://github.com/voormedia/rails-erd Run: bundle exec erd