Giter Club home page Giter Club logo

looks-tasty's Introduction

:: Looks Tasty! ::

Great app with recipes where everyone can find something for himself. Just check it at - https://looks-tasty.herokuapp.com/

...and feel free to contribute! :)

CircleCI codebeat badge

Technology stack πŸ’Ž

Name Version
Ruby 2.3.1
Ruby on Rails 5.1.2

Browser support

Name Version
IE 10, 11
Chrome newest
Firefox newest
Safari 7 and greater
Opera 15 and greater

Prerequisites β˜•

You will need the following things properly installed on your machine..

  • ImageMagick

Installation πŸ“š

Do following things if it is your initial setup

  • cd ~/Developer/
  • git clone [email protected]:Haradd/Looks-Tasty.git
  • cd looks-tasty
  • bundle install
  • create database with default seeds rake db:create db:schema:load && rake db:seed
  • rake reviews_average
  • rake review_counter

Running / Development πŸ‘ž

You want to run a project on Your local machine - let's to it!

  • cd ~/Developer/Looks-Tasty
  • rails s

Running Tests ♦️

Specs are really important..

  • bundle exec rspec

Worth to read

  • Here we can place some additional documentation specific to project that is Worth knowing

Troubleshooting πŸ‘œ

  • Some specific, often occuring things that can go wrong during setup of project.

Other valuable info

  • lorem ipsum dolor

looks-tasty's People

Contributors

haradd avatar

Watchers

RafaΕ‚ Rudol avatar

looks-tasty's Issues

TODO:

  • oauth2 with facebook, gmail
  • star rating system
  • 'my recipes' page for users

Refactor to use service object

def configure_profile
@user = User.new(session["devise.new_user"])
@user.username = user_params[:username]
@user.password = Devise.friendly_token[0, 20]
if @user.save
auth = session["devise.oauth_data"]
UserProvider.create!(
provider: auth["provider"],
uid: auth["uid"],
user_id: @user.id
)
sign_in_and_redirect @user, event: :authentication
else
render :finish_oauth_sign_up
end
end

This is a really nice example to refactor into the service object. Try to leave only code responsible for rendering and redirect in the controller and put rest of it into the service object.

Remove redundant code

respond_to do |format|
if @recipe.save
format.html { redirect_to @recipe, notice: "Recipe was successfully added." }
else
format.html { render :new }
end
end

Since you only handle HTML format here then the whole respond_to do |format| block is not needed. You can just have logic itself

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.