Skip to content

Instantly share code, notes, and snippets.

(function() {
var options = {
productsSearchPath: '/s/Sites-modcloth-Site/dw/shop/v16_9/product_search',
productsPath: '/s/Sites-modcloth-Site/dw/shop/v16_9/products/({product_ids})',
apiParams: {
client_id: 'dd7cd63e-1cac-4ebb-ad88-618de6960926',
sort: 'bestSellers',
expand: 'images,prices',
},
searchOptions: {
diff --git a/app/models/product.rb b/app/models/product.rb
index 85a74bd..85d04b0 100644
--- a/app/models/product.rb
+++ b/app/models/product.rb
@@ -668,7 +668,8 @@ class Product < ActiveRecord::Base
:is_returnable,
:show_as,
:display_all_measurements,
- :inventory_classification_id
+ :inventory_classification_id,
App 614390 stderr: from /home/concili/rubyvenv/rankingdesk__com/2.1/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
App 614390 stderr: from /home/concili/rubyvenv/rankingdesk__com/2.1/gems/railties-4.2.4/lib/rails/application.rb:165:in `call'
App 614390 stderr: from /home/concili/rubyvenv/rankingdesk__com/2.1/gems/railties-4.2.4/lib/rails/engine.rb:514:in `call'
App 614390 stderr: from /home/concili/rubyvenv/rankingdesk__com/2.1/gems/railties-4.2.4/lib/rails/application.rb:246:in `env_config'
App 614390 stderr: from /home/concili/rubyvenv/rankingdesk__com/2.1/gems/railties-4.2.4/lib/rails/application.rb:534:in `validate_secret_key_config!'
App 614390 stderr: from /home/concili/rubyvenv/rankingdesk__com/2.1/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
App 614390 stderr: from /home/concili/rubyvenv/rankingdesk__com/2.1/gems/railties-4.2.4/lib/rails/application.rb:165:in `call'
App 614390 stderr: fr
class EasybrokerFeedGenerator < FeedGenerator
EASY_AVISO_FEED_NAME = "EasyAviso"
VERSION = '1.0'
def conditions_for_country(country)
{
:conditions => "countries.id = #{country.id}",
:order => 'properties.organization_id ASC, properties.id ASC' # we sort them by agency on xml
}
def find_properties(query_options = {})
Property.
where(publish_prices: true).
where("(properties.sale AND properties.sale_price > 0) OR (properties.rental AND properties.rent > 0)").
joins(:property_images).
scoped_for_sitemap(query_options, true).
includes(organization: [:import_batch]).
where("(organizations.import_batch_id IS NULL OR import_batches.format <> ?)", EXCLUDE_FROM_IMPORT_BATCH).
uniq.
extend(KaminariAutoPaginate)
+function ($) { "use strict";
var LiveFilter = {
initialize: function() {
if($('#live_filter_form').length) {
LiveFilter.initLocationFilterReload()
LiveFilter.initializeCheckBoxGroup()
LiveFilter.initializeClosedPropFilters()
LiveFilter.initializeChangeLocationClearMap()
LiveFilter.form = $('#live_filter_form')
class User < ActiveRecord::Base
ATTR_ACCESSIBLE = [:first_name,
:last_name,
:login,
:email,
:password,
:password_confirmation,
:organization_id,
:time_zone,
:user_locale,
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require File.expand_path('../config/application', __FILE__)
Rails.application.load_tasks
sent_user_ids = Message.where(sender_id: current_user.id).group(:receiver_id).pluck(:receiver_id)
received_user_ids = Message.where(receiver_id: current_user.id).group(:sender_id).pluck(:sender_id)
users_ids = sent_user_ids + received_user_ids - [current_user.id]
@users = User.where(id: users_ids)
@jparbros
jparbros / base_controller.rb
Created November 4, 2015 17:17
simple auth token rails
class Api::BaseController < ApplicationController
before_filter :authenticate_parent
private
def authenticate_parent
authenticate_parent_from_token || render_unauthorized
end
def authenticate_parent_from_token