Check out my latest project called Rails UI 🎨

February 5, 2018

3 responses

Let's Build: With Ruby on Rails - Discussion Forum

Continuing my long stent of Ruby on Rails builds is yet another build that focuses more on relationships in a real-world discussion forum application.

The application on the outside looks a little bleak but I promise there is a lot going on under the hood of which you could extend to be something very feature-rich.

Follow along with more videos below and be sure to download the source code to both explore the application and refer to it as you build alongside me.

Download Source Code

The Goals of the application

To create a discussion forum with appropriate channels. Every discussion will belong to a channel and an author. The author can manage their own discussion by editing or deleting it at any time once logged in. If a user has admin privileges they can manage any user's discussions and replies. Any discussion can have many replies which are what makes forums so great for a community-based application.

Some key features of this application include:

  • Markdown support and syntax highlighting for code snippets
  • Validations
  • Admin user roles
  • Prettier URLS
  • Ajax replies ( load automatically on submit rather than a full page refresh )

Gem List

We'll be making use of some gems we have in the past as well as some new ones to lend us a hand with the feature list above. At the time of writing and publish the Gemfile for this project resembles the following:

source 'https://rubygems.org'

git_source(:github) do |repo_name|
  repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
  "https://github.com/#{repo_name}.git"
end


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.1.4'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use Puma as the app server
gem 'puma', '~> 3.7'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 3.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
gem 'bulma-rails', '~> 0.6.2'
gem 'simple_form', '~> 3.5'
gem 'devise', '~> 4.4', '>= 4.4.1'
gem 'gravatar_image_tag', '~> 1.2'
gem 'jquery-rails', '~> 4.3', '>= 4.3.1'
gem 'rolify', '~> 5.2'
gem 'cancancan', '~> 2.1', '>= 2.1.3'
gem 'friendly_id', '~> 5.2', '>= 5.2.3'
gem 'redcarpet', '~> 3.4'
gem 'coderay', '~> 1.1', '>= 1.1.2'


group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
  # Adds support for Capybara system testing and selenium driver
  gem 'capybara', '~> 2.13'
  gem 'selenium-webdriver'
  gem 'guard', '~> 2.14', '>= 2.14.2'
  gem 'guard-livereload', '~> 2.5', require: false
end

group :development do
  # Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
  gem 'web-console', '>= 3.3.0'
  gem 'listen', '>= 3.0.5', '< 3.2'
  # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
  gem 'spring'
  gem 'spring-watcher-listen', '~> 2.0.0'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

Follow along

Below are the remaining parts of the screencast series. I invite you to follow along and actually type out the code to the best of your ability along with me. As always you should refer to the Github repo if you ever get stuck or need some code to copy in the process.

Part 2

Part 3

Part 4

Part 5

Part 6

Part 7

Part 8

Part 9

Shameless plug time

Hello Rails Course

I have a new course called Hello Rails. Hello Rails is modern course designed to help you start using and understanding Ruby on Rails fast. If you're a novice when it comes to Ruby or Ruby on Rails I invite you to check out the site. The course will be much like these builds but a super more in-depth version with more realistic goals and deliverables. View the course!

Leave a reply

Sign in or Sign up to leave a response.

3 responses

BonsWaw
Icons/flag
Icons/link diagonal

Бонусы казино https://24casi.com/ за регистрацию с выводом, список рейтинг

Icons/flag
Icons/link diagonal

MARK DAVSON INVESTMENT MANAGEMENT BINARY TRADING is an investment platform that puts people back on track, to invest is to allocate money with the expectation of a positive benefit/return in the future.In other words, to invest means owning an asset or an item with the goal of generating income from the investment or the appreciation of your investment which is an increase in the value of the asset over a period of time.
This new strategy has put so many people back on track all over the world, with vast experience and deep knowledge of binary trading, you will be able to get out from all your financial difficulties.

How does this work, you can invest any amount and earns benefit in return

If You invests $100 and earns $1000 per week (7 days).
If You invests $200 and earns $2000 per week (7 days).
If You invests $300 and earns $3000 per week (7 days).
If You invests $400 and earns $4000 per week (7 days).
If You invests $500 and earns $5000 per week (7 days).
If You invests $600 and earns $6000 per week (7 days).
If You invests $700 and earns $7000 per week (7 days).
If You invests $800 and earns $8000 per week (7 days).
If You invests $900 and earns $9000 per week (7 days).
If You invests $ 1000 and earns $10000 per week (7 days).
If You invests $2000 and earns $20000 per week (7 days).
If You invests $3000 and earns $30,500 per week (7 days).
If You invests $5000 and earns $50,000 per week (7 days).
If You invests $10,000 and earns $100,000 per week (7 days).
If You invests $20,000 and earns $200,000 per week (7 days).
If You invests $30,000 and earns $300,000 per week (7 days).
If You invests $40,000 and earns $400,000 per week (7 days).
If You invests $50,000 and earns $500,000 per week (7 days).

All are in Weekly earnings and it's 100% guaranteed. (Guaranteed payment).
You can also place your earnings on monthly Basis.
You can as well place your earnings once in 2 weeks (14 days)
You can place and receive your earnings every month, In 3Months, In 6Months or a year.
Free to contact us if you are interested through the email:[email protected]
Once you contact us, we will forward you our website to register.

Thank you
Mr.Mark Davson
MARK DAVSON INVESTMENT MANAGEMENT
Email:[email protected]
WhatsApp:+1(204)808-4628
WhatsApp:+1(731)333-3262

Icons/flag
Icons/link diagonal

MARK DAVSON INVESTMENT MANAGEMENT BINARY TRADING is an investment platform that puts people back on track, to invest is to allocate money with the expectation of a positive benefit/return in the future.In other words, to invest means owning an asset or an item with the goal of generating income from the investment or the appreciation of your investment which is an increase in the value of the asset over a period of time.
This new strategy has put so many people back on track all over the world, with vast experience and deep knowledge of binary trading, you will be able to get out from all your financial difficulties.

How does this work, you can invest any amount and earns benefit in return

If You invests $100 and earns $1000 per week (7 days).
If You invests $200 and earns $2000 per week (7 days).
If You invests $300 and earns $3000 per week (7 days).
If You invests $400 and earns $4000 per week (7 days).
If You invests $500 and earns $5000 per week (7 days).
If You invests $600 and earns $6000 per week (7 days).
If You invests $700 and earns $7000 per week (7 days).
If You invests $800 and earns $8000 per week (7 days).
If You invests $900 and earns $9000 per week (7 days).
If You invests $ 1000 and earns $10000 per week (7 days).
If You invests $2000 and earns $20000 per week (7 days).
If You invests $3000 and earns $30,500 per week (7 days).
If You invests $5000 and earns $50,000 per week (7 days).
If You invests $10,000 and earns $100,000 per week (7 days).
If You invests $20,000 and earns $200,000 per week (7 days).
If You invests $30,000 and earns $300,000 per week (7 days).
If You invests $40,000 and earns $400,000 per week (7 days).
If You invests $50,000 and earns $500,000 per week (7 days).

All are in Weekly earnings and it's 100% guaranteed. (Guaranteed payment).
You can also place your earnings on monthly Basis.
You can as well place your earnings once in 2 weeks (14 days)
You can place and receive your earnings every month, In 3Months, In 6Months or a year.
Free to contact us if you are interested through the email:[email protected]
Once you contact us, we will forward you our website to register.

Thank you
Mr.Mark Davson
MARK DAVSON INVESTMENT MANAGEMENT
Email:[email protected]
WhatsApp:+1(204)808-4628
WhatsApp:+1(731)333-3262

Est. reading time: 5 minutes
Stats: 35,374 views

Collection

Part of the Let's Build: With Ruby on Rails collection