Hello, I try to launch many daemons from a script written in the
script/repository.
One daemon is launched per site (AR model "Site").
I want to load Rails environment just once.
Each time a daemon is launched, script exits.
I tried to "encapsulate" daemon launching in threads, but I have the
sa
Hello,
I have a rails application, wich display data from database.
I have a ruby script wich load rails environment and fill the
database.
I would like to do a cache system for the model X, while my ruby
script puts data
model X < ActiveRecord::Base
@@cached_data = {}
def after_create
Here's what I did :
# =
# script/em_manager
# I did a chmod +x on this file
#!/usr/bin/env ruby
require 'rubygems'
require 'daemons'
options = {
:app_name => "em_manager",
#:ARGV => ['start', '-f', '--', 'param_for_myscript']
#:dir_mode => :nor
In facts, as Person.all gave me Men and Fathers, I had
require_dependency 'father' in the Man class.
On 11 nov, 11:08, Frederick Cheung <[EMAIL PROTECTED]> wrote:
> On Nov 11, 3:40 pm, joserwan <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > Hi,
Works fine, thank you very much !
On 11 nov, 11:08, Frederick Cheung <[EMAIL PROTECTED]> wrote:
> On Nov 11, 3:40 pm, joserwan <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > Hi,
>
> > I've got 3 classes :
>
> > class Person < ActiveRe
Hi,
I've got 3 classes :
class Person < ActiveRecord:Base
end
class Man < Person
end
class Father < Man
end
When I call Man.all, I expect to have men and fathers, but I don't.
When I call Person.all, I have people, men and fathers...
Do I have to redefine the find method of the Father's clas
No, the problem is out of there...
thank you for the idea !
On Oct 20, 11:53 am, "Craig Demyanovich" <[EMAIL PROTECTED]>
wrote:
> If you rename the call variable in your block to, say, phone_call, does that
> make a difference? I can't find call on the reserved word list for Ruby or
> Rails, b
Hi,
I really don't understand :
In a partial, I have a collection "@users", in wich I included
"calls" : User.all(:include => :calls") in my controller.
So, in the partial, I have something like :
<% @users.calls.each{|call|%>
<%=h call.from %>
<% } %>
And the error is that i can't get ni
Hello,
What is the better way to organize database in case of inheritance
models ?
If I have 2 classes :
class Person < ActiveRecord::Base
attr :name, :adress
end
class Teacher < Person
attr :school
end
I'll have à table people with fields name, adress and school.
Is there the bet
ed&r=67&sa=X&;...>
> rails<http://www.google.com/url?q=http://www.answers.com/rails&r=67&sa=X&oi...>
> *
> Any ideas ??
>
> 2008/9/24 Alexandre Petitjean <[EMAIL PROTECTED]>
>
>
>
> > Ok, i do understand the idea, but i don't know w
Hello,
Look at the prototype helper : periodically_call_remote
It will call an action each X second. In this action, you should have
a render like :
render :update do |page|
page['my_field_id'].replace_html "updated!"
end
On Sep 24, 4:14 am, Alex2101 <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I w
11 matches
Mail list logo