Lily-Brown / bandapp

BandWagon is an application that allows bands and musicians to find each other.
https://hop-on-the-bandwagon.herokuapp.com
0 stars 1 forks source link

BandWagon

BandWagon is an application that allows bands and musicians to find each other. Users can sign up and log in as a Band or a Musician, view/edit their profile and browse either Bands or Musicians (whichever they're looking for!). Users then have the option to connect with Bands/Musicians and start making music together!

App URL

https://hop-on-the-bandwagon.herokuapp.com

Technologies Used

Ruby 2.3.0
Rails 5.0.0.1
Javascript 5.1
Html 5
CSS 3
AWS/S3

Frameworks, libraries, and gems

Bootstrap 3.3.7
Turbolinks 5.0.1
Jquery-Rails 4.2.1
Rspec-Rails 3.5.2
Shoulda-Matchers 3.1.1
Paperclip 5.1.0
BCrypt 3.1.11
Friendly_id 5.1.0
Imagemagick 7.0.3

Database

Postgresql

Data Models

User Stories and Dev Workflow

Trello: https://trello.com/b/5EE8Rz51/bandwagon

Wireframes

https://app.moqups.com/k.bushman/ZFgDqhSRw6/view

Some Challenges

Adding Instrument to Musician - Challenge of collection_check_boxes input attriubtes

<%= form_for(@musician,url: musician_path) do |f| %>
...
  <%= f.collection_check_boxes( :instrument_ids, Instrument.all, :id, :instrument_name, {:prompt => "Please Select a Sector"},     {:multiple => true}) do |b| %>
    <%= b.label class:"label-checkbox" do%>
    <%= b.check_box + b.text %>
  <% end %>
<% end %>

Creating Triple Join Model Relationships - Accessing Triple Join Table

class BandInstrumentMusiciansController < ApplicationController

 def create
    @member = BandInstrumentMusician.new(new_member_params)
    # ... 
  end
  private

  def new_member_params
    params.require(:band_instrument_musician).permit(:band_id,:instrument_id,:musician_id)
  end

Updating Trip Join Model Relationships - Storing Musician Relationship

class BandInstrumentMusiciansController < ApplicationController

  def update
    @opening = BandInstrumentMusician.find(params[:id])
    musician = Musician.find(session[:musician_add])
    @opening.musician = musician
    # ...
  end

In: views/musicians/show.html.erb

<div><%= link_to 'Add to My Band', edit_band_instrument_musician_path, class: 'button musician-button' %></div>
class MusiciansController < ApplicationController

  def show
    session[:musician_add] = @musician.id
    # ...
  end

Future Features:

To deploy on your local machine:

In your terminal:
1 - Fork and clone repo
2 - Install Imagemagick
3 - Run bundle
4 - Run rake db:setup
5 - Start your server rails s
6 - Start using the website!