similar to: New release of ez-where plugin

Displaying 20 results from an estimated 3000 matches similar to: "New release of ez-where plugin"

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 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 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 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 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
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 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 Jun 14
6
find and LIKE ''xxx%'' clause
Hi there ! I try to figure out how to do something like this in Rails : SELECT * FROM my_table WHERE name LIKE ''GOGONAM%'' My problem is the % and the quotes. >From now, I do like this : searched_name = params[:name]+''%'' user = MyTable.find(:all, :conditions => ["name LIKE ?", searched_name]) But is there a more gracefull way to do a LIKE
2006 Aug 19
3
Special ruby language for describing sql conditions
I was brainstorming today about a smooth way to define conditions in an sql query, when the numbers of attributes increase, so does the uglyness. So instead of passing a hash, I thought you could specify the conditions directly in code. I hacked together some example code which actually turned out to work. The result is concise and pretty beutiful. def search(params) Ad.find(:all) do
2006 Feb 19
8
building multiple find conditions
I am trying to allow for AND type ''find'' but to allow for simply a single set of find criteria. controller code... @vw_string = @vw_string1 = @vw_string2 = @vw_string3 = [] if params[:beg_intake_date] != "" then @vw_string1 = ["intake_date between ? and ?", params[:beg_intake_date], params[:end_intake_date] ] end if
2006 Apr 22
4
Slice and dice plugin
I''ve been playing around with some easier ways of specifying conditions in active record, and have come up with a little plugin that some may find useful. Currently active record finder and calculations methods can take a :conditions option with a string or array listing some sql conditions, eg: Animals.find :first, :conditions => "name = ''Tiger''" My
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 Jun 19
6
SQL Search Qustion
I am working on writing a search method where a user can type a string of words and I return all the objects that have fields that match all of the words in one or a combination of fields. Person first_name last_name Pet name Person has_many :pets I want to write some SQL so that if I search for "Tony AAAA" I will get all the people who have Tony and AAA either in their
2006 Aug 07
2
Dynamically created queries
Hello, I am having difficulty dynamically building a query. I want to ensure that I''m using Active Record protection against SQL injection attacks. In PHP land, I would have built up the query in my logic & attempted to clean every variable - a bit tedious really. I want to be able to achieve something like: events = Event.find(:all, :conditions => [**DynamicallyBuiltQuery**
2012 Apr 30
2
ez package installation fails - ubuntu 12.04
Hello everyone, I've just installed ubuntu 12.04 and the package named 'ez' fails to install because of a dependency. The error messages are: Error : package ‘Matrix’ 1.0-2 is loaded, but >= 1.0.3 is required by ‘ez’ ERROR: lazy loading failed for package ‘ez’ * removing ‘/usr/local/lib/R/site-library/ez’ The downloaded packages are in ‘/tmp/Rtmp38etdB/downloaded_packages’
2006 Feb 15
10
STI Question
Hi everyone, I have 3 types of people (for now): Staff Faculty Students To break them up into classes, but keep them in the same People table, I''ve broken them up like so (code and ''ends'' snipped): class Person < ActiveRecord::Base class Employee < Person class Staff < Employee class Faculty < Employee class Student < Employee So, when I insert
2006 Jul 02
18
JOIN conditions
Hi, how can I get Rails to generate SQL queries with conditions in the JOIN clause? What I would want is: SELECT * FROM people p LEFT OUTER JOIN jobs j (p.job_id = j.id AND j.salary > 9999999) I tried People.find(:all, :include => ''jobs'', :conditions => ''jobs.salary > 9999999'') but that generates SELECT * FROM people p LEFT OUTER
2006 Apr 16
3
variable variables?
Hi everyone, Does Ruby support variable variables like PHP (http://www.php.net/manual/en/language.variables.variable.php)? Or do I have to use eval, like some_hash.each_pair{|key, pair| eval "#{key} = #{value}" } Or is there some other way? I''m actually trying to figure this out in order to use ez_where to create its conditions from a hash, so if this isn''t even
2007 Feb 14
1
php version 4.4 / ez publish
Hi list, is there any repository on this world where I can stick to and update to a stable and hopefully secure and hopefully long supported version 4.4 of php? EZ publish's software requirements as of the current version tells me that it requires php 4.4 which doesn't meet what Centos 4.4 or its upstream provides. For a certain project I want to use ez publish. Is there any solution
2006 Feb 23
20
ActiveRbac 0.3 release - We''re now on Engines
Hi I have just released the 0.3 revision of ActiveRecord - make sure to get the fresh, hot packages from https://activerbac.turingstudio.com/releases What is ActiveRBAC? ------------------- ActiveRBAC is a Ruby on Rails library that provides a full stack RBAC (Role Based Authorization) system with user, group, role and permission management. It provides models and controllers to edit