https://connect.ok.ru/offer
?url=<URL_TO_SHARE>
&title=<TITLE>
&description=<DESCRIPTION>
&imageUrl=<IMAGE_URL>
/app/config/deploy.rb
task :symlink_shared do
run "rm -rf #{current_path}/public/uploads"
run "ln -nsf #{shared_path}/uploads #{release_path}/public/uploads"
end
after 'deploy:restart', 'symlink_shared'
def self.properties( properties ) # properties = [1, 2, 3]
if properties.present?
if properties.first == 'all' # я делал себе для выборки товаров со всеми параметрами
properties = Product_property.all.pluck(:property_id)
where(property_id: properties)
else
where(property_id: properties) # WHERE .property_id IN (value1,value2,...);
end
end
end
Product.properties(params[:properties])