-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zad6 #262
base: master
Are you sure you want to change the base?
zad6 #262
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dzięki za rozwiązanie, wszystko działa tak jak powinno 🎉
@@ -1,7 +1,7 @@ | |||
source 'https://rubygems.org' | |||
git_source(:github) { |repo| "https://github.com/#{repo}.git" } | |||
|
|||
ruby '2.5.3' | |||
ruby '2.5.1' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ruby 2.5.3
był jak najbardziej ok, nie trzeba było zmieniać wersji 😉 Żeby zainstalować brakującą wersję wystarczy puścić rvm install 2.5.3
(zakładając, że używamy rvm
, ale z tego co to było narzędzie pokazywane na wykładzie).
class CustomersController < ApplicationController | ||
|
||
def index | ||
@customers = Customer.all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do wcięć w rubym używamy 2 spacji 😉
|
||
def index | ||
@customer = Customer.find(params[:customer_id]) | ||
@products = @customer.products.order(price: :desc).includes(:categories) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
O, jest nawet preloading categories
- to celowo? 🤔 😄
Przepraszam, że tak słabo się to wszystko prezentuje wizualnie, ale z powodu zbliżających się kolokwiów nie mam w ogóle czasu 😢