similar to: Ez_where question

Displaying 20 results from an estimated 80000 matches similar to: "Ez_where question"

2006 Feb 22
2
Using ez_where
Hi All, I am trying to pass values to ez_where to construct my conditions. I need to know how the params need to be formated for ez_where. My search class looks like this: def search @display_ad = DisplayAd.new(params[:display_ad]) cond = Caboose::EZ::Condition.new do pub_date == ''@display_ad.pub_date'' io_number =~
2006 Apr 18
3
ez_where query question
I''m having fun composing queries with ez_where, but am stuck on how to formulate the following using the ez syntax: (begin_date >= ? OR end_date >= ?) AND (description LIKE ? OR name LIKE ?) There are two clauses, each containing OR operators (the ez ''any'' syntax) but both clauses must evaulate to true for a match. Can anyone suggest the proper way to construct
2006 Jul 28
2
ez_where: Stuck Again
I just keep thinking this is going to slice through queries like a hot knife through butter, but... there''s something I''m not getting. Here''s the gist: # get the people like the search criteria Members.find(:all, :conditions => [''first LIKE ? OR last LIKE ?'', params[:search], params[:search]) joined with the alternative of
2006 Aug 02
5
Fun with ez_where
I''ve been trying to use the ez_where plugin to create a dynamic finder. The structure looks somehing like this.. === controller === def list attribute_filter = params[:filter] @filter = Caboose::EZ::Condition.new :table do attribute <=> attribute_filter if attribute_filter end # ... do the find with the @filter # end === view === .... <%= link_to
2006 Apr 15
2
ez_where : i''m puzzled
I have the following code: condition_clause = "%#{@phrase}%" logger.info "condition is #{condition_clause}" unless @phrase.nil? condition = Caboose::EZ::Condition.new :affiliates do affiliate_name =~ "%#{@phrase}%" # <<< here''s the problem end options[:conditions] = condition.to_sql logger.info "ajax
2006 Jan 31
11
ez_where plugin updated features.
Friends- I wanted to let people know that there is a new experimental release of this plugin. I would love feedback on syntax and features. There is now a full test suite with fixtures that covers all the available syntax. Look at the test suite for more syntax possibilities. There have been many additions since my last release. Fabien Atelier has been working on this with me and has
2006 Jun 30
3
New release of ez-where plugin
Hello friends- There is a new release of the ez-where plugin. This plugin makes it easy to do complex ActiveRecord queries without writing any SQL. Ruby operators are mapped to SQL operators like so: foo == ''bar'' #=> ["foo = ?", ''bar''] foo =~ ''%bar'' #=> ["foo LIKE ?", ''%bar'']
2006 Mar 15
4
ActiveRecord::RecordNotFound in search results act_as Ferret
Hello, I''ve installed the Ferret gem and also got the act_as_ferret code from the wiki. I''ve set up my model "Branch" to act as ferret using the code below. acts_as_ferret :options => {:fields => [''name'', ''body_text'', ''address'']} I''ve also set up a ferret_controller with the code below def find
2006 May 23
3
ez-where headscratch
Hi there, I''m puzzled by this apparently simple query I can''t manage to reassemble using ez_where plugin. cond = Caboose::EZ::Condition.new :my_table do start_on < Time.now any {end_on > Time.now; end_on.nil?} end I keep getting the following result : >> cond.to_sql => ["my_table.start_on < ? AND (my_table.end_on > ?)", Tue May 23
2006 Aug 02
3
Data relationships for e-commerce: users, orders, addresses
Hi there I''m in the process of developing an e-commerce Rails app but am getting a little stuck on what models I should be working with on the order/checkout side of things. The app requires users to be registered and authenticated to checkout. So I already have a User model and an Order model (which belongs to a User). The Order model is largely similar to that used in the Agile Rails
2006 Feb 24
2
raking my brain to fix this
I am ''raking'' my brain to fix this problem - I have searched, googled, looked through rake documentation, wiki.rubyonrails and I can''t fix... This works $ rake plugindoc (in /home/craig/ruby-db/th-db) rdoc -o doc/plugins/ez_where --title ''Ez Where Plugin Documentation'' -- line-numbers --inline-source -T html
2007 May 22
1
Bug in Ferret::Search::SortField::SCORE ??
i have been trying to get this to work for a while now. my controller is sort = [ Ferret::Search::SortField::SCORE_REV ] @results = Record.multi_search(params[:search_terms], [ Link, Post, Event ], {:limit => :all, :sort => sort }) and in my view i just render a conglomeration of the appropriate partials for each model. it seems that no matter what i do, i can''t get the
2007 Nov 09
2
Problem with stemming and AAF
I''m sure I''m missing something completely obvious here, so I hope someone can point me in the right direction! I''ve implemented a basic search with AAF, which works as expected; I''m running a ferret drb server, and using will_paginate to page results. The code in my search_controller.rb: search_text = params[:query] || " " @products =
2006 Jul 21
3
Credit card processing through Australian gateways (eway etc)
Hi there Has anyone out there embarked on credit card processing in a Rails app through Australian gateways such as eway? I''m aware of Payment and ActiveMerchant, but neither support Australian gateways. It''s a little beyond me right now to hack these to work with eway. Any clues would be appreciated here. Richard Sandilands
2006 May 16
0
strange partial error
I''m getting this weird partial problem. I''m calling the partial like so: <%= render :partial => partial, :locals => {:message => message, :display => display, :indent => indent, :button_type => button, :terms => params[:search_terms]} %> The object in message can be printed out first, and then within the partial I can access it, and it returns false
2006 Feb 06
9
tests fine, but fail under rake
Hi there, So I have an odd error at the moment that only occurs when I run tests via rake. It''s happening with two tests now. Under a simple ruby run, the tests are fine, e.g.: D:\User\Code\ruby\prometheus>ruby test\functional\story_comments_controller_test .rb Loaded suite test/functional/story_comments_controller_test Started ......... Finished in 2.37 seconds. 9 tests, 65
2008 Dec 23
2
NoMethodError in Book#show_subjects
Hi, I am quite new to ROR.I am trying to create a rails simple application that has informations about Books and Subjects.Srangely, I finished creating a basic application, and it worked fine. But then , I just tried to add some more values in the database, and faced problem with migration, that just made me crazy. SO I deleted the database and did the database and migration thing all over again
2006 Nov 20
1
Getting started with ActiveMerchant & new Ecommerce book
Hi there I''ve got a copy of the ''Beginning Ruby on Rails Ecommerce'' book and am trying to integrate ActiveMerchant into my app. My order.rb file has the line: ''include ActiveMerchant::Billing'' per the book. My Order model also has, amongst other things, the following validation: '' validates_inclusion_of :billing_country, :in =>
2011 Jun 11
1
Having a problem adding a foreign key
I keep getting this exception "SQLite3::SQLException: no such column: books.user_id: SELECT "books".* FROM "books" WHERE ("books".user_id = 4)" ,which sounds like there is no user_id in books table.So i just installed foreigner plugin and added " t.integer :user_id, :null => false" and "add_foreign_key(:books, :users)" in book
2006 Aug 08
4
Creating a child simultaneously with parent via form
Hi there I''ve got a user model and an address model; a user has_many addresses. A user object can be created via an html form which also allows for an initial address to be created. I''ve got a controller method working to save both objects via the form, but I suspect I can achieve this in a more rails-esque manner. Here is my controller method: def signup @user =