Displaying 20 results from an estimated 600 matches similar to: "rails 3.0.3 and visit_CoercibleString errors"
2010 Jul 08
4
testing authentication with basic_auth
hi, I''ve got an api which is using
authenticate_or_request_with_http_basic
What are you guys using to test this? I''m using rspec, and before I
was using rspec-rails, I was using authorize from Rack::Test to do the
authentication. However, authorize clearly doesn''t work when using
rspec-rails, so I''m wondering what everyone else is doing?
--
You received this
2011 Jan 28
5
mysql quotation wonky
Why would, in an upgrade from 3.0.1 to 3.0.3, a rake db:migrate run
this:
SELECT "schema_migrations"."version" FROM "schema_migrations"
vs this ?
SELECT `schema_migrations`.`version` FROM `schema_migrations`
__ rake db:migrate output __
rake aborted!
Mysql::Error: You have an error in your SQL syntax; check the manual
that corresponds to your MySQL server version
2006 Jun 13
1
calleridname.agi patch to only overwrite name if it is missing
I edited the calleridname.agi patch to only overwrite the name if it is missing.
The asteridex option still overwrites the name since it is our master list for known numbers.
--
Steven
calleridname.agi.patch:
--- C:\Documents and Settings\steveb\Desktop\calleridname.agi-orig Tue Jun 13 14:37:09 2006
+++ C:\Documents and Settings\steveb\Desktop\calleridname.agi Tue Jun 13 14:37:09 2006
@@ -16,6
2004 Sep 09
3
Caller-ID name lookup via anywho.com
Hey all,
Did I see something on here about using an AGI script to do reverse
lookups via anywho.com? I have a PRI that only gets caller-id number and
no Alpha.
TIA,
--
Daniel Jimenez <djimenez[at]pobox[dot]com>
2011 Apr 18
12
Arel - clone bug (and fix), feature requests
Hi all,
I''ve been playing around with Arel this week (actually outside of Rails)
and found an issue with the clone implementation. I''ve added a patch and
a testcase here:
https://github.com/codders/arel/commit/660f706491ac012cb133554cffeaa6b9ae6046e9
and made a pull request against the rails/arel repo.
I''ve also been playing around with support for ordering on
2011 May 05
9
[threadsafe] Arel ToSql visitor is not threadsafe
Hey,
We hit a bug today because Arel::Visitors::ToSql is not threadsafe.
Here is what is happening:
Arel::Visitors::ENGINE_VISITORS is a cache of visitors instances.
These instances are not inherently threadsafe because it contains
state ''@last_column'', ''@connection'' that is shared between threads.
The other variables ''@pool'',
2011 May 11
2
Issue with Arel::SelectManager and insert Method
Hello,
Arel::SelectManager (arel 2.0.9) uses following statement to insert a
new record:
@engine.connection.insert im.to_sql, ''AREL'', primary_key_name,
primary_key_value
But in DatabaseStatements insert ist defined as:
insert(sql, name = nil, pk = nil, id_value = nil, sequence_name = nil)
Actually, Arel::SelectManager does not use the sequence name. This
leads to issues
2012 Jan 03
1
Can Arel handle UPPER and LIKE condition?
Hello all, I''ve recently been on a project where somewhere needs
using case insensitive search(using UPPER(name) LIKE '''') and LIKE condition,
I want to use arel and don''t use the old style string concatenation,
can arel handle this?
But I check on arel documentation, doesn''t seems have any upper/like
operator,
and check on arel source, under
2012 Apr 23
1
Searching and returning arrays
im a begginer in RoR and am using rails 3.2.3 and ruby 1.8.7
This forum has helped me to progress but I''m confused by one thing.
My app is supposed to allow seaching for results depending on the check
boxes that are checked. In my case, when the user checks a determined
facility and clicks "search" the corresponding hotels with only those
facilities should be returned. I can
2011 Aug 14
5
Puzzled with form on multiple table rows
I''ve got a table of events, and each event has a boolean attribute
is_ten_event.
On each row of the table is a chekbox to edit the value of is_ten_event,
so that multiple rows can be edited with one submit.
In order to allow boxes to be un-checked as well, the logic in the
controller works like this
get array of events from checkboxes that are ticked.
make all events.is_ten_event =
2012 Apr 18
2
RoR - Search Forms with Checkboxes, display appropriate results
I have a form that allows me to search a hotel by city or name and by
rating through radio buttons. It all works.
However, my hotel model has_one :facility, this facility model is
composed by several boolean fields (for example, roomservice:boolean
restaurant:boolean and so on)
The question is, I want to add checkbox fields for each facility I have
and in the search form, when the user selects
2012 Dec 18
1
Arel limit Where if fields are present
I trying to create a select using Arel but I''m passing three parameters, I
want to include the parameters only if they are different to nil or blank.
Here is my method:
def self.advsearch(summary_description, specialties, place)
User.joins(:experience,:summary,:information)
.where(Information.arel_table[:business].eq(false))
2004 Aug 19
1
AGI Script: calleridnamelookup.agi
Is anyone successfully using the AGI script calleridnamelookup.agi (or
anything similar) ?
I get both name and number caller ID from my POTS line, but I'd save
money if I had them deliver ANI only.
I've downloaded and installed the AGI script calleridnamelookup.agi, but
I always get
-- Executing AGI("SIP/9525485560-5359", "calleridnamelookup.agi") in
new stack
2012 Mar 13
2
[Arel]Building query, but can't get a proper output
I have the following code:
advertisements_arel = Advertisement.order("advertisements.id
DESC").arel
@advertisements = (params[:website_id].present? ?
advertisements_arel.where(:website_id => params[:website_id]) :
advertisements_arel).to_a
It returns a struct Arel::SelectManager::Row data
But I''d like it to return an array of Advertisement objects (like it
would
2011 Nov 22
4
A "strict Arel" mode for ActiveRecord to prevent SQL injection vulnerabilities
Hello rubyonrails-core,
I’ve been looking into possible changes to ActiveRecord / Arel to make it
easier to write Rails applications that are free of SQL injection
vulnerabilities, and in particular do so in a way that makes it easy for a
code reviewer to verify that the app is safe from such bugs.
The concern:
-----------------
With the ActiveRecord API as is, it’s relatively easy to write
2009 May 09
4
Generating a "conditional time" variable
Hi everyone,
Please forgive me if my question is simple and my code terrible, I'm new to
R. I am not looking for a ready-made answer, but I would really appreciate
it if someone could share conceptual hints for programming, or point me
toward an R function/package that could speed up my processing time.
Thanks a lot for your help!
##
My dataframe includes the variables 'year',
2010 May 18
2
Samba 4 and nsswitch
Having some difficulties determining which way to go here.
Have an Ubuntu 10.2 server running S4Alpha11. The samba stuff is
working well enough (though with a bit too much idle CPU
consumption--haven't go there yet).
However, I can't get proper responses for file system and user/group
lookup.
With AD in Samba 3 nsswitch.conf was
passwd: files winbind
group: files
2011 Feb 08
4
Remove ActiveRecord::Relation#& alias for 'merge' ? (or at least only reference and not use in AR)
Would the core team be open to the removal of the ''&'' alias for
ActiveRecord::Relation#merge?
The reason is that in Ruby the ''&'' operator refers to an intersection
of two sets of data, not a merge. (within the context of the Array
class)
Recently Arel added support for SQL Set Operators:
2-0-stable:
2011 Jul 25
5
Arel quiz: complex queries with associations
I have a real-world application with some complex queries that I want to
convert to Arel (as part of an upgrade to Rails 3.1). So that I can
understand what I''m doing before I flail around in my real app, I wrote
a little sample app (just the models) with some similar associations --
one table joined with itself and more tables that join to another table,
so there are some queries that
2013 Feb 19
4
Float::INFINITY ranges in where() clause
This seems like such an obvious idea that I''m having trouble believing
I''m the first to think of it. Why not take ranges containing
Float::INFINITY and translate them to the appropriate greater than or
less than comparisons? Example:
class Person
scope :voters, -> { where(born_on: (-Float::INFINITY..18.years.ago)) }
end
This would generate something along the lines of