ds = params[:diameter].split(','),
@items = @sub_category.items.where( :size => [ds.first..ds.last])
The require method ensures that a specific parameter is present, and if it's not provided, the require method throws an error. It returns an instance of ActionController::Parameters for the key passed into require.
messege : { author_id:1, destin_id:2, content:3}
create_table :carts_items do |t|
t.references :card
t.references :item
t.decimal :quantity
end
1) Каким образом надо настраивать DNS сервер? Я правильно же понимаю что не надо будет для каждого домена прописывать настройки в DNS.
server {
server_name www.example.com;
location / {
proxy_pass 11.22.33.44:8080;
}
}
server {
server_name ~^(?<sub_domain>[a-z0-9\-]+)\.example.com$;
location / {
proxy_pass 11.22.33.44:8080/$sub_domain$uri$is_args$args;
}
}
@properties = Product.find(params[:product_id]).product_properties