-
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 #263
base: master
Are you sure you want to change the base?
Zad6 #263
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, działa tak jak powinno 😉 Całość wygląda ŁUDZĄCO PODOBNIE do tego rozwiązania - widocznie razem z @PrimaRoyale macie bardzo podobny sposób myślenia 😜
@@ -0,0 +1,5 @@ | |||
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.
w rubym do wcięć używamy 2 spacji 😉
validates :price, presence: true, numericality: {greater_than: 0} #format: { with: /^\d+??(?:\.\d{0,2})?$/ } | ||
|
||
scope :sorted, -> { order(price: :desc) } | ||
scope :cheaper_than, -> p { where('price < ?', p) } |
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.
scope są, ale nigdzie nie użyte 😢
@@ -0,0 +1,4 @@ | |||
class Mig1 < ActiveRecord::Migration[5.2] | |||
def change |
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.
hmm 🤔 pusto tutaj
No description provided.