Git Product home page Git Product logo

groupproject's People

Contributors

jaaneey avatar majabogeski avatar supmiguel avatar

Watchers

 avatar  avatar

Forkers

jaaneey supmiguel

groupproject's Issues

refactor bootstrap classes

here's an example of a simple refactor in your show action for schools. on lines 27-32, you have:

<div class="row">
  <div class="col-md-1"></div>
  <div class="col-md-2"></div>
  <div class="col-md-8"><h4><%= review.title %></h4></div>
  <div class="col-md-1"></div>
</div>

this could be refactored as follows:

<div class="row">
  <div class="col-md-8 col-md-offset-3"><h4><%= review.title %></h4></div>
</div>

Look into the col-*-offset classes in Bootstrap.

Add edit view for users

I'd consider adding edit functionality for users -- after creating a test user in your app, I wanted to go back and change the email to fiddle with the password reset, but wasn't able to. (You've got an edit action in your controller, but right now it doesn't have much to do without a view.)

Add confirm step on review deletion

If I click to delete one of my reviews, it's deleted immediately without any confirmation. It would help the UX if there was an intermediate confirmation step, to prevent users from accidentally clicking on delete and losing their review.

Refactor reviews create action

here's your code for the create action in the reviews controller:

  def create
    @user = User.find(session[:user_id])
    @review = @user.reviews.build(review_params)
    if @review.save
       flash[:create] = "Successfully Created"
       redirect_to school_path(@review.school_id)
    else
        flash[:create] = "can't be blank"
        redirect_to "/users/#{@user.id}/reviews/new?school_id=#{review_params[:school_id]}"
    end
  end

in the else block, I'd encourage you to refactor so that you're using a named route helper method (rather than doing a bunch of string interpolation). I'd also render instead of redirecting -- you're doing error handling in your _form partial, so you don't need to pass along any flash information.

no inline styling!

on line 1 of your new action for reviews:

<div class="panel panel-default text-center" style="width:100%">

noooo!! get rid of that inline styling -- put it in a stylesheet if you need that rule.

review design enhancements

regarding review ratings, I think it would be cool to enhance the UI. Having an input of text is strange UI, since a user could type anything in there. I might change it to a number input, maybe with a minimum of 0 and a max of 5 or something. If you want to push things even farther, I'd look into using a star-rating widget or something. (e.g. this https://github.com/kartik-v/bootstrap-star-rating).

summary

hey @yomawa, @SUPMIGUEL, @Jaaneey --

really nice work on the rails project. I went through your code and have a few suggestions for improving the code if you want to continue working. If you have the time, I'd encourage you to keep working on this -- it would be a nice app to put into your portfolio!

Let us know if you have any questions.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.