I've noticed some strange behavior ONLY in feature tests when a user is not logged in and they aren't being redirected to the sign in page and I'm trying to understand why. I’m using poltergeist as the javascript driver.
Here's a couple of examples:
# works as expected
it 'redirects...
Trevil - thanks for the feedback and I like your idea of breaking this into multiple queries.
One strange optimization technique I tried yielded some pretty significant results.
I added this forced index: FORCE INDEX (index_products_on_sku_canonical) and it's showing significant performance...
Hello,
I have this query and I cannot figure out how to optimize this query any further. Since it’s a joined query, I can’t seem to get it to honor any of the indexes.
Here’s the monstrosity:
SELECT
*
FROM assets_products ap
INNER JOIN assets a1 ON ap.asset_id=a1.id
INNER JOIN...
Hello,
I'm working on my first gem and I'm having a problem referencing dependencies. In my gem, I need to reference code from some other custom gems we've developed.
We'll call my Gem "test_company_models". In my test_company_models gem, I need to include PricingExtensions from our...
Hello,
I'm trying to test an active record object destroy failure but I'm having problems creating a failure situation. I have a before_filter method called 'require_user_payment_info' which validates the @payment_info object before the delete method is called so I can't create a 'bad'...
Hello,
I'm writing a series of test that test credit cart transactions and our card service relies on communicating to a sabrix server through an ssh tunnel.
I've created something that works but I have to admit, it doesn't make sense because I'm using a combination of a unix exec call and...
Hello,
I'm trying to find a very abstract and "one size fits all" for converting nested active record results to nested hashes. It's easy, to do one level deep as such:
results_to_hash = Hash[ found_categories.map{ |c| [c.id, c.title]}]
But, when I try to add another collection to the...
We have 4 table relationship, 2 main tables - "assets" and "products", a through table - "assets_products" and a products/price relationship. Here's the gist of the tables with only the relevant fields:
assets...
[s]Ian - thank you for your help and I took your suggestion and now my query is looking like this and returning a LOT more results:
SELECT * FROM `products` WHERE (in_store = 1 AND (LOWER( replace(replace(replace(replace(replace(name, ' ',''), ',', ''), '&', ''), '-', ''), ':', '') ) LIKE...
I've been wracking my brain trying to find a solution for this for a couple of days. I'm trying to make a "smart" query that can handle a wide range of search terms. The queries run fine until there are special characters involved and I've had some success w/ the REPLACE method on some...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.