Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: c73mr0ck
  • Content: Threads
  • Order by date
  1. c73mr0ck

    Devise feature tests not redirecting to sign_in page

    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...
  2. c73mr0ck

    Optimizing this join query

    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...
  3. c73mr0ck

    Problems referencing code in bundled gems

    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...
  4. c73mr0ck

    Problems testing a destroy failure

    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'...
  5. c73mr0ck

    PROBLEMS CREATING AN SSH TUNNEL

    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...
  6. c73mr0ck

    Creating nested hash from nested active record results

    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...
  7. c73mr0ck

    Help optimizing this crazy query

    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...
  8. c73mr0ck

    Ignoring special characters in search query

    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...

Part and Inventory Search

Back
Top