/Vagabond

Primary LanguageJavaScript

Vagabond - Live Link

Vagabond Travel App

Full Stack App built for our WDI Group Project

Vagabond is a simple way for users to share tips (AKA posts) about their favorite locations around the world.

Users will be able to create a profile, make new posts and view a record of their travels.

Feel free to fork / star / watch for your own personal use.

See the published project at immense-taiga-88650.herokuapp.com!

#Entity-Relationship Diagram

#Technologies Used

####Languages: HTML5, JavaScript, CSS, Ruby ####External Libraries: jQuery, Materialize ####API's: Google Maps API ####Frameworks: Rails

Code We're Proud Of


Ricardo


def update
  post_id = params[:id]
  @post = Post.find(post_id)

  if @post.update_attributes(post_params)
    flash[:notice] = "Updated successfully."
    @location = Post.find_by_id(params[:id]).location
    redirect_to location_path(@location)
  else
    @post.errors.full_messages.each do |message|
      flash[:error] = message
    end
    redirect_to edit_post_path(@post)
  end
end

Zach


def create
 user = User.new(user_params)
  if user.save
    login(user)
    redirect_to user
    UserMailer.welcome_email(user).deliver_now

 else
   @user.errors.full_messages.each do |message|
     flash[:error] = message
   end
   redirect_to new_user_path
  end
end

RJ


def activity_count
  activity_counter = {}
  self.posts.each do |p|
    p.activities.each do |a|
      if activity_counter.has_key?(a.name)
        activity_counter[a.name] += 1
      else
        activity_counter[a.name] = 1
      end
    end
  end
  activity_counter
end

Screen Shots



Contributors

Ricardo Arellano, Zach Cusimano & Ryan Johnson