Displaying 20 results from an estimated 3000 matches similar to: "Caching application data"
2006 Jan 23
5
Undefined method error
Hi everybody,
Small problem. I get this error:
undefined method `all_categories'' for BlogCategory:Class
Code of BlogCategory class is:
class BlogCategory < ActiveRecord::Base
has_and_belongs_to_many :blog_posts
validates_presence_of :name
validates_uniqueness_of :name
# Return all categories ordered by name
def all_categories
find :all, :order =>
2007 Mar 06
9
bug or "feature"?
hi, i''m trying ferret, i''ve a model which has some records and two of
them have a title with the word ''again'' (one or more time), so i''ve
tried to do a search for ''again'', but i didn''t found anything...i''ve
edited the title with ''test again'', searched for ''test'', and i''ve
2006 Aug 24
10
MongrelCluster - How can I make a request to a specific mongrel instance?
In our app we''ve a number of singleton ruby classes that cache static data
in hashes, things like
string values, system config params, etc). In a webbrick environment this
works ok, but we find
in production we have a problem because we have 4 caches, one for each
mongrel instance.
This also isn''t a BIG problem, but our cache.reload() methods are kinda
useless now, because
we
2005 Aug 12
3
Voipjet experiment
Hi List,
I'm wondering if someone who uses VoipJet as their termination service
would do me a favor.
If I call the American Airlines reservation number (1-800-433-7300), the
call gets connected, but after 30 seconds asterisk drops the call
responding that no one answered.
I'm using areskicc2 (calling card app) as an authentication system and I
don't know if that is what is
2007 Nov 08
3
options_from_collection_for_select
I need to add a blank or dashed field to the
options_from_collection_for_select helper but can''t seem to get it to
work. Tried this, but with no effect:
<%= options_from_collection_for_select @airlines, ''id'', ''name''],
{:include_blank=>true} %>
Anyone know how to do this? Thanks,
-S
--
Posted via http://www.ruby-forum.com/.
2007 Jan 30
3
Toll-free dialing via PRI problem
We have a PRI from Telepacific. Asterisk 1.2 and a Sangoma A101 T1 card.
Outgoing calls to certain toll-fee (8XX) numbers fail -- we hear ringing but
the calls are never answered. All other calls, and most toll-free numbers
are not affected. The numbers that are affected are all travel related
companies (United Airlines, American Airlines, US Air, Starwood Hotels,
etc.) we cannot connect to
2012 Sep 23
2
Find by id in the view template dynamically
Rails 3.1.3
I have a model ''Airline'', whose STRING column is ''company'' only.
Also, another model ''Plan'' has an INTEGER column ''airline_id''.
I would like to show the ''company'' name (string) in a template like
<% @plans.each do |plan| %>
Airline: <%=
2005 Jul 12
3
Unable to call certain 800 numbers through Teliax
We are unable to call certain 800 numbers through Teliax but I thought I
would post this here and see if anyone else had the same problem with either
Teliax or other carriers.
The 800 numbers causing problems pick-up the call right away and are in the
US - American Airlines (8004337300) and Staples (800-378-2753) - we can call
many other 800 numbers just fine.
Our asterisk setup has a 4-port
2010 Feb 01
3
merging data frames gives all NAs
Dear kind R helpers,
I have a vector of runway names in rwy ("31R", "31L",... the number is
user selectable)
arrgnd is a data frame with data for all flights and all runways, with a
Runway column.
I am trying to subset arrgnd into a dat frame for each selected runway,
and then combine them back together using the following code:
for (j in 1:nr) { # nr = number of
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
2003 Jan 21
2
WARNING : no network interfaces found.
i get the following error
WARNING : no network interfaces found.
when i run smbclient or nmblookup etc.
the following is the settings in my computer.
workgroup = TRIDENTMUMBAI
security = domain
password server = 10.160.128.152
netbios name = smbsys
interfaces = 192.168.1.225
encrypt passwords = yes
--
Get Your Private, Free E-mail from Indiatimes at http://email.indiatimes.com
Buy the
2005 Dec 15
5
Rails vs. J2EE: Sharing state in memory?
Hi,
I am from a Java background and pretty new to Ruby and Rails.
What I am wondering is how I would shared state accross requests and users
without involving IO, i.e. use memory.
My current understanding is that for each request a new process ist spawn
and therefore it gets its own memory. So no sharing can take place between
requests?
Do I understand this right? For those who know
2009 Dec 09
2
[LLVMdev] Unsigned int multiplication using UMUL_LOHI
Hello,
I'm having trouble getting LLVM to use UMUL_LOHI instead of MUL for
unsigned integers. In the TargetLowering constructor I have:
setOperationAction(ISD::MUL, MVT::i32, Expand);
setOperationAction(ISD::SMUL_LOHI, MVT::i32, Legal);
setOperationAction(ISD::UMUL_LOHI, MVT::i32, Legal);
The problem seems to be with the code in LegalizeOp() in LegalizeDAG.cpp.
Here's a snipet of
2006 Aug 23
5
Singleton-like Worker
Hello there,
I need a Worker Class to be Singleton-like, that means there must be at
maximum one Instance at a time. When a new Request is made to create another
worker of this type, it should return and wait for the other instance to be
destroyed.
what i need to do: i have a worker who needs to do sth with java and
openoffice, and it seems when i have more tha one worker simultaneously,
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
2006 Jul 03
6
Req: Workers as singletons
Hi,
it would be nice to be able to specify workers as singletons. By this
I mean that every call to the new_worker method returns the same
instance of said worker. This can be done transparently either by
adding a new argument to new_worker (something like :singleton =>
true) or adding a new method, like I did in my installation of
BackgrounDrb:
def get_worker_by_class(klass)
2007 Aug 21
7
mocking singletons
How can I safely mock a singleton without the mocked method living on
outside the scope of the test method?
I''ve run into this problem with mocking methods on globals (gasp!) in
the past by doing something like
def mock_my_global
original = $my_global
$my_global.expects(:foo).returns(''bar'')
yield
$my_global = original
end
Is there something similar I
2006 Oct 16
4
Singleton Pattern in RoR
Hi all
how can I implement the singleton patter in RoR?
thanks
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this
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