Displaying 20 results from an estimated 2000 matches similar to: "Observable notifying a controller."
2007 Jul 26
1
Lohan the observable
Sorry, that name is a misnomer. However, I was excited to find that Ruby
has a built in Observable module and I''m pretty bored, so I apologize in
advance....
require ''observer''
# one who is observed
class Celebrity
include Observable
attr_accessor :name
attr_reader :is
def is=(val)
@is = val
changed
notify_observers(self)
end
end
# one who
2006 Apr 04
2
Ajax Effects Tutorial
Hi there,
I am in love with rails... And now I want to rule Ajax effects with
rails. Where could I find a book like: Ajax on Rails? :)
Tutorials will be welcome too.
Thanks in advance.
Fernando Lujan
2006 May 17
3
Slackware 10.2
Hi guys, I'm trying to use asterisk with my slackware 10.2 box.
Kernel 2.6.13 from the testing...
The udevd are not creating the /dev/zap devices.
Someone already have success installing asterisk over slackware?
Thanks in advance.
Fernando Lujan
2010 Apr 16
1
Active Record observers broken: can't be used for "before" callbacks
I was just wondering what about a report that I made almost 2 months
ago: Active
Record observers
broken<https://rails.lighthouseapp.com/projects/8994/tickets/4087-activerecord-observers-cant-be-used-for-before-callbacks>
I think it''s a pretty big bug. In Rails 3, creating an observer with a
"before_save" callback (for instance) will result in all observed models
being
2006 May 10
2
Rails, Postgres and the Date Field.
Hi guys,
I''m having problems with my app. First of all, I created a date_select
with the code:
<%= date_select(''contact'', ''birthday'', :order => [''day'',''month'',''year'']) %>
In the contacts table, I create a date field:
birthday DATE
When I save the values goes wrong into the database.
2009 Nov 26
4
Is this a bug?
Hello all, while I''m using acts_as_audited(on jruby platform),
after vendored the acts_as_audited, it reports some error,
line 167,
# Start observing the declared classes and their subclasses.
def initialize
Set.new(observed_classes + observed_subclasses).each { |klass|
add_observer! klass } #this line
end
after some trace shows this one, when observed_classes is empty, will
2006 May 05
5
Sessid.
How can I get the sessid from the current session object?
For instance, I log in the system, and want to know which sessid I''m using.
I''m storing the session using active_record. Later on, I want to restore
a session finding it using the sessid.
Thanks in advance.
Fernando Lujan
2006 May 10
3
has_many association.
I''m creating a address book.
A user can have many contacts.
In the user model, I put:
has_many :contacts
And in the contact model, I put:
belongs_to :user
To list all contacts, I search as following:
@user = User.find(session[:user_id])
And rendering:
<%= render(:partial => "contact", :collection => @user.contacts)%>
To persist I am using the following
2006 May 18
1
R2/MFC Configuration.
I'm trying to put asterisk working with a proprietary pbx system.
I'm doing it using a T1 crossover cable. The pbx system uses the R2/MFC
specification. And the don't inform if it uses cas, ccs, ami or hbd3.
My digium card is flashing a red light.
How can I put this working with the R2/MFC system?
Thanks.
Fernando Lujan
2006 May 24
2
TE406P - MFC/R2
Guys,
I'm trying to configure a TE406P with MFC/R2.
here goes my zaptel.conf:
span=1,0,0,ccs,hdb3,crc4
cas=1-15:1101
dchan=16
cas=17-31:1101
span=2,0,0,ccs,hdb3,crc4
cas=32-46:1101
dchan=47
cas=48-62:1101
The first strange behavior is that the:
zap show status
shows this:
Description Alarms IRQ
bpviol CRC4
T4XXP (PCI) Card 0 Span 1
2007 Oct 30
2
WebDav Support.
Hi guys,
I read that mongrel supports the webdav protocol. I need to "create" the
webdav files and allow a third party app access it just for read purposes.
What do you recommend?
--
Fernando Lujan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20071030/1527bd35/attachment.html
2006 May 09
1
Reusing a model to form and link_to.
Hy guys,
Inside my app I have a form which contains user information.
Sometimes a have a form with a text_field as above:
<%= form_remote_tag(:html => { :action => url_for(:controller =>
"my_controller", :action => "my_action") }) %>
<%= text_field(''my_object'', ''my_parameter'', :maxlength =>
2006 Mar 29
5
Asterisk Between PBX and FXS
Hi guys,
I''m setting up asterisk to run with another pbx server. This pbx server
support a feature that allows 2 extensions connect to the same FXS. No I put
asterisk in the middle.
Asterisk receives the call and dial to a SIP/peer.
How the pbx installed support 2 extensions to one fxs... How can I figure out
in asterisk which extension was dialed before the call came to asterisk?
2006 May 03
1
Differences betwen check_box_tag and check_box form helper.
What is the difference between the check_box_tag and the check_box form
helper?
I can''t understand why both must exist. :(
Thanks.
Fernando Lujan
2006 Jul 05
2
Serialized object behaves weird
Hi!
I got a class named EinsatzFilter which I serialized to session. Before
saving to session it works afterwards I keep getting the message:
"undefined method `to_s'' for #<Person:0x38c6ab8>". "Person" is a from
ActiveRecord::Base inherited class.
Code:
class EinsatzFilter
include ApplicationHelper
attr_reader :personen, :monat, :projekte, :kunde
2006 Sep 15
2
Caching::Sweeper Access to Controller
Hello,
I''m running Mongrel 0.3.13.3, cluster 0.2.0, and Rails 1.1.6 and I
have a problem with a sweeper not having access to the controller
instance.
NoMethodError (undefined method `session'' for nil:NilClass):
/app/models/audit_sweeper.rb:16:in `log''
/app/models/audit_sweeper.rb:9:in `after_update''
2006 May 04
4
What do you use RJS for?
I''ve read an intro or two for RJS, but I don''t fully get what it may be
used for - AJAX? Please post what you currently use RJS for.
Thanks!
Joe
--
Posted via http://www.ruby-forum.com/.
2010 Jan 25
1
ActionMailer does not find templates in production mode
Hello everyone,
I am currently struggling with the following issue that only seems to appear
in my production environment:
When attempting to send a mail from an ActionMailer the template location
algorithm does not seem to pick up the corresponding template:
ActionView::MissingTemplate (Missing template
event_mailer/approval_requested_notification.erb in view path app/views):
2006 May 26
0
Observer Subject Pattern on Rails.
Hi guys,
I''m developing a chat application with rails. I need to instantiate a
observer for each user that logs in the app and then, when this user
type a message update all users with the new message.
I try wiki.rubyonrails.org for help, and find nothing I can use. I
searched using the keywords rails observer and didn''t find anything
interesting.
Where can I find useful
2005 Jun 25
2
observing a habtm association
Is there some way to observe when an association is added in a habtm
relationship?
I know I could turn the relationship into a model, but I don''t want to
give up using
:include in my finds...
joshua