Displaying 20 results from an estimated 2000 matches similar to: "match operator in find"
2006 May 30
4
Help with Shopping Cart example from Agile Web Development 2nd Edition
Hi
I get to about page 103 of the book and get an application error. Further
investigation reveals the following error in the dev log:
Mysql::Error: #42S22Unknown column ''id'' in ''where clause'': UPDATE sessions
SET `data` =
2010 Apr 18
2
getting column's main
Hello.
I have data of potatoes production in EU during 1998-2009 from EuroStat
where the first column consists of the names of EU countries, the following
columns consists of appropriate data in each year.
Let's say, I investigate Lithuania. For example, I have a row containing
potatoes production in 1998, 1999, ..., 2009 in Lithuania. I can easily find
the maximum value in this row but...
2006 Apr 10
2
X-HTMLifying Code
This falls into the category of "wonder if anyone''s done this"?
The site I''m working on now has affiliate sponsors who provide link HTML.
Almost all of it violates some W3C spec for XHTML, the primary offenders
being capitalized tag names and unclosed tags like IMG. They also include
ampersands as query-string separators, which also offends the W3C Validator.
Has
2020 Jun 02
3
Samba vs Windows - File sharing in a domain setting
I've been working with Samba in an AD domain setting for several years now.
Small potatoes, nothing fancy. A few months ago, I came across the
limitation of Samba, in comparison to file sharing from a Windows server,
that, at the current moment, it doesn't offer an indexing service that is
compatible with Windows Search. So, no matter how much I like Samba, if I
need this feature, I have
2009 Aug 10
2
ggplot: colours to geom_segments
Just as an exercise I am tying to add colours to a geom_segment command. I can get one colour but not a sequence of colours.
Can anyone suggest how I can get the green lines in the plot below to be different colours? I thought I could use a palatte of colours but that did not seem to work.
Thanks
=========================================================================
library(ggplot2)
xx
2006 Jan 09
3
Pagination :conditions not working - MySQL v. PostgreSQL, Rails abstraction v. embedded SQL
Hi everyone,
I have this code:
@person_pages, @people = paginate :person, :per_page => 20,
:conditions => [ "username LIKE ? OR first_name LIKE ? OR
last_name LIKE ? OR preferred_name LIKE ?",
"%" + params[:q].downcase + "%",
"%" + params[:q].downcase + "%",
2006 May 02
4
useful bit of code (hopefully)
Hi,
I often find myself using bits of code like this inside ActiveRecord,
perhaps it''s useful for others, or others can improve on it:
###########
# fix user input before validating it
before_validation :sanitize_input
# santize input before actual validation is called
# this uses the little methods defined below
def sanitize_input
trim %w(adres postcode woonplaats email naam
2006 May 30
1
sharing partials across controllers.
Hi,
I was wondering if it is possible to share a partial across views in
different controllers? If so, how would I go about doing this? Would I
pass in a parameter to render(...) of the partial telling it where it is
located?
And help would be appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2012 Sep 20
4
access controller's object attributes in view page
Hi,
I am new to ROR and learning it. In my controller I have an admins
record and I am passing that admin object to the admin''s view page to
get the name of the admin. But when I try to access the name it is
showing error as "undefined method `name'' for :current_admin:Symbol"..
Please help..
Please find my code below
Sessions Controller
def create
2007 Nov 02
11
xrcise tutorial, undefined method ''upper_bt''
Hi
I''m trying to follow the tutorial on xrcise at
http://wxruby.rubyforge.org/wiki/wiki.pl?UsingXRCise
But I keep getting the following error when I try to run the example;
tutorial.rb:21:in `initialize'': undefined method ''upper_bt'' for
#<CaseChangeFrame:0x2d610f8> (NoMethodError)
from tutorial.rb:28:in `new''
from
2008 May 24
3
Searching the wiki
Hi,
If you type a keyword and press Enter in the search field on the wiki, it
does a title-search by default which is very limited.
I tried looking for information about atheros or madwifi and couldn't find
anything. Then I tried ipw2200 (I knew it existed because I created it)
and no results still. I had to ask Ralph to see if the index was old, only
to find out that there is a
2006 Dec 27
10
Mixing html tags and Ruby blocks
I''m trying to get the following idea to work:
<%= @column_names.each { |t| <td> t.downcase </td> <td>
@listing.send(t.downcase)</td> } %>
Essentially I want to display a form that has a left and right TD, with
the left TD being a column name and the right TD being the column data.
If there''s a better way (the Rails way ?), I''m all ears
2006 Sep 05
4
No matches
The following script creates a search index and then searches it. I get
no results? Where am I going wrong?
Thanks.
-----------BEGIN SCRIPT----------------
require ''rubygems''
require ''ferret''
include Ferret
path = ''/tmp/myindex''
field_infos = Ferret::Index::FieldInfos.new()
field_infos.add_field(:name, :store => :yes, :index => :yes)
2006 Apr 20
7
Rails + postgres case insensitive searches.
Hello all
I am wondering how rails handles case sensitivity in databases. If I
do a Person.find_all_by_name("tim") in mysql I would expect to get
tim, TIm, and Tim. Do I only get tim in postgres?
How do other people deal with this? Do you resort to find_by_sql for
all your postgres queries to get case insensitive results?
2006 Jul 15
2
FieldQuery not returning anything
Hey ..
The QueryParser RDoc page explains to me on how to search for a specific
value in a specific field. This is not working the way i thought it
should be, what am i doing wrong? Here''s an example ..
I''m storing model data in the index like this:
doc << Field.new( "object_id", object.id, Field::Store::YES)
doc << Field.new( "type",
2006 Sep 23
8
svn problems
I can consistently segfault the 0.10.4 gem, so I''m trying to get the
subversion version working with hopes towards tracking the problem down.
I have a fresh SVN checkout but:
a) the version (in ferret.rb) claims to be 0.9.6; and
b) Ferret::Index::FieldInfos and a couple other classes are missing at
run time. It looks like this is because they''re not exported in the C
2012 Feb 29
1
ggplot2 dot chart-start at zero
I am trying to create a simple dot-plot in ggplot2 with a solid line from the y-axis to the dot, something I first saw in Cleveland's 1984 book
What I would like is to have the graph start at zero on the x-axis but leave some space on the right side of the plot area.
I assumed that I should be able to do this with expand() in scale_x_continuous() but either I'm wrong or just don't
2012 Oct 02
3
case insensitive inclusion validation
I want to add case_sensitive option to inclusion validation. This will
allow to do:
validates :numbers, :inclusion => { :in => %(One Two), :case_sensitive =>
false }
Does it make a sense?
Thanks.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To view this discussion on the web visit
2010 Dec 30
4
perl code to remove newlines
Given an HTML file which looks like this:
--------- begin snippet ---------
<HTML
><HEAD
><TITLE
>We've Lied to You…</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="Maximum RPM"
HREF="index.html"><LINK
REL="UP"
2005 May 23
1
has_and_belongs_to_many dual insert error ?
Hi !
(See references at the end)
I have a slight problem. Whenever I save one of my domain models, which
contains an has_and_belongs_to_many relationship with another one, the
relationships are doubled.
My domain is a series of pictures, where each picture can be tagged with
one or more words. So, a picture of my dog could be tagged "Jordy, Dog,
Dog 2005", for example.
In my