Displaying 20 results from an estimated 44 matches for "caboose".
Did you mean:
caboo
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 ''Add filter'', {:filter=>value}.merge(params) %>
this works fine, but there are some weird things...
2006 Feb 24
2
raking my brain to fix this
...led,
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
vendor/plugins/ez_where/lib/caboose/clause.rb
vendor/plugins/ez_where/lib/caboose/condition.rb
vendor/plugins/ez_where/lib/caboose/ez.rb
vendor/plugins/ez_where/lib/caboose/hash.rb
clause.rb: mmc..c........c..c..c...
condition.rb: mmc...........
ez.rb: mm...
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 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
17:11:43 CEST 2006, Tue May 23 17:11:43 CEST 20...
2006 Aug 16
0
acts_as_paranoid and alias_method_chain
...ted(association_id, options = {})
with_deleted = options.delete :with_deleted
returning belongs_to_without_deleted(association_id, options) do
if with_deleted
reflection = reflect_on_association(association_id)
association_accessor_methods(reflection,
Caboose::Acts::BelongsToWithDeletedAssociation)
association_constructor_method(:build, reflection,
Caboose::Acts::BelongsToWithDeletedAssociation)
association_constructor_method(:create, reflection,
Caboose::Acts::BelongsToWithDeletedAssociation)
end
end
end
alias_...
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 =~ ''@display_ad.io_number''
end
puts @display_ad.pub_date
puts @display_ad.io_number
puts cond.to_sql
#display_ad = DisplayAd.find(:all, conditions => cond...
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
2007 Jan 28
0
problems with acts_as_paranoid (noticed while using acts_as_versioned)
...h_deleted(association_id, options = {})
with_deleted = options.delete :with_deleted
returning belongs_to_without_deleted(association_id, options) do
if with_deleted
reflection = reflect_on_association(association_id)
association_accessor_methods(reflection,
Caboose::Acts::BelongsToWithDeletedAssociation)
association_constructor_method(:build, reflection,
Caboose::Acts::BelongsToWithDeletedAssociation)
association_constructor_method(:create, reflection,
Caboose::Acts::BelongsToWithDeletedAssociation)
end
end
end
alias_method_c...
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 May 20
1
acts_as_paranoid overrides ActiveRecord::Base??
Guys,
I am trying to figure out what exactly does this line do at the end of
"acts_as_paranoid" plugin?
ActiveRecord::Base.send :include, Caboose::Acts::Paranoid::ActiveRecord
My problem: I have some classes that I use acts_as_paranoid, and others
with tagging support. Classes declared as taggable, throw error, which
appears to be in the acts_as_paranoid version of the "find" method,
however it''s not supposed to over...
2008 Oct 14
1
Starting Server gives an error
...rror:-
E:/demo/vendor/rails/railties/lib/commands/servers/
webrick.rb:11: warning: already initialized constant OPTIONS
E:/demo/vendor/rails/activesupport/lib/active_suppo
rt/dependencies.rb:249:in `load_missing_constant'': Expected E:/Demo
/vendor/plugins/eons_plugins/acts_as_paranoid/lib/caboose/acts/p
aranoid.rb to define Caboose::Acts::Paranoid (LoadError)
from E:/Demo/vendor/rails/activesupport/lib
/active_support/dependencies.rb:452:in `const_missing''
from E:Demo/vendor/plugins/eons_plugins/ac
ts_as_paranoid/init.rb:1:in `load_plugin''
from
./sc...
2006 Mar 22
4
Problem with ACL plugin system
...the following
error:
NoMethodError in Admin#index
protected method `access_denied'' called for
#<AdminController:0x408fc9a8>
RAILS_ROOT: script/../config/..
Application Trace | Framework Trace | Full Trace
./script/../config/../vendor/plugins/acl_system/lib/caboose/access_control.rb:24:in
`access_control''
The prob seems to be in the following code block:
23 if c.respond_to?(:access_denied)
24 c.access_denied
25 else
26 c.send(:render_text, "You have insufficient permissions
to access #{c.controll...
2008 Mar 11
2
for a beginner - good rspec examples?
I''m learning to use rspec and I want to see some good examples.
Any recommendations of open source projects that demonstrate the use
of rspec?
So far I''ve found:
1) the Caboose sample app (http://sample.caboo.se/)
2) the Altered Beast forums app (http://beast.caboo.se/forums/1/topics/4650
)
Any others come to mind?
I''m especially interested in seeing examples that spec RESTful
authentication.
Thanks,
Daniel
2007 Feb 11
4
Let's make RAILS_ROOT an absolute path on Windows
As this Caboose article [] suggests, I am not the only one who had
this problem. RAILS_ROOT is a relative path on Windows, and it can
bite you in unexpected ways. I had that problem while working on
CruiseControl.rb.
There is a trivial patch fixing it (by simply applying
File.expand_path to the path before assign...
2007 Sep 04
3
Model Specs: Fixtures vs Mocks + Stubs?
What is the general opinion about fixtures versus mocking and stubbing
in model specs? I heard from agile on IRC that they save the database
testing for integration testing, but I also see that the caboose
sample applicaiton uses fixtures. I also noticed that on the rspec
site, it says "Ironically (for the traditional TDD''er) these are the
only specs that we feel should actually interact with the database."
(http://rspec.rubyforge.org/documentation/rails/index.html). Thoughts?
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 param is #{@phrase}"
logger.info "ez condition is #{condition.to_sql}&...
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 Aug 06
0
Rails Core Weekly July 16 - August 6
Rails Core Weekly July 16 - August 6
Rails Core Weekly summarizes the rails-core mailing list, a list
dedicated to Ruby on Rails internals and its development. RCW is
brought to you by Rodney Ramdas and proofread by the good people of
The Caboose (http://blog.caboo.se/) for accuracy.
RSS feed and RCW home:
http://www.pinupgeek.com/articles/category/rails-core-weekly-news
The ruby on rails podcast by Michael Genereux supposedly now includes RCW:
http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=163609703&s=143452
==PL...
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 Jun 11
3
[SUMMARY] Rails Core Weekly June 5 - June 11
...7958#new">here</a>.
*RSS and Feedback*
RSS feed : <a href="http://www.pinupgeek.com/articles/category/rails-core-weekly-news">here</a>
Feedback : rramdas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Credits: thanks to <a href="http://blog.caboo.se">#caboose</a>for reviewing !
--
Rodney
http://www.pinupgeek.com
http://www.dutchrailers.org