similar to: Access session from observer?

Displaying 20 results from an estimated 10000 matches similar to: "Access session from observer?"

2006 Jul 07
3
Observer and Plugin conflict...
Hi fellas, I have setup the acts_as_authenticated plugin and activated the UserObserver to send activation emails. I also have a homemade security plugin which adds methods to ActiveRecord::Base like let_read and let_write. On the server start, those two enter in conflict because the Observer does something with the User model but it can''t find the let_read and the let_write
2006 Jun 22
2
Embed a Rails app within another?
I''m looking for a solution where I could load and render pages from one Rails application within another. I''m looking through the Rails code right now to see if this would even be remotely possible. Does anyone have any ideas? I know the obvious answer would be to proxy the app via Net::HTTP, but this is undesirable because: - I don''t always want to depend on having
2006 Jul 17
1
Access session data from observer
I am writing an internal time tracking app, and am curious to know if it''s possible to access the session data from an observer. Each ''user'' has a list of their current projects, which is updated (via an observer) everytime a ''project'' or ''hour'' is saved. To find out who the current user is, I am trying to do a
2006 May 24
1
Observer behavior differences between DEV and TEST environments ?
Hi all ! I''m having an issue and I can''t seem to make heads or tails of it. I am attempting to add an observer to a model object. I created app/models/greenback_transaction_observer.rb, inherited from AR::Observer, defined methods, registered in config/environment.rb, but things don''t work... So, I took a step back and put in the following code: class
2006 Feb 19
0
newbe: observer setup
Hi All, Having problem setting up an observer to log changes to a database. I have following the Prag Rails book but think I have something missing. I am trying a simple puts to see if the observer is working, but getting nothing on the console. Here is what I have. I don''t get any errors. Thanks for any suggestions/references to debugging. Dave The two models: display_ad.rd
2006 Feb 22
0
How to get model observer to work?
I can''t seem to get a model observer to work. In my environment.rb I have: config.active_record.observers = :item_observer In item_observer.rb I have: class ItemObserver < ActiveRecord::Observer observe Item def after_update(item) if @old.active != item.active logger.debug ''observer#after_update'' #... end @old = nil end def
2006 May 09
0
[semi-OT] Find position of floated elements
I am trying to find the actual _displayed_ position of a floated element using Javascript. Does anyone know of a technique to do this? I know that per the CSS2 spec, floated elements are removed from the flow and thus don''t really have a position (AFAIK). However, I am trying to find the position in which the item is actually displayed. Prototype''s Position object only
2006 Dec 12
0
problems with variable updated from observer
hello, just stuck with the following problem: in my view a select updates with an observer a variable in the controller. works fine. --- <%= select(''filter'', ''rolle'', Rolle.auswahl_systemrollen) %> <%= observe_field :filter_rolle, :url => {:action => "update_pers_rolle"}, :with => ''filter_rolle'' %> --- this is
2007 Dec 14
0
async-observer rails plugin
I''m pleased to announce the existence of async-observer. This is the very first public release. In the future I''ll confine announcements to the beanstalk-talk mailing list. WHAT IS ASYNC OBSERVER? ----------------------- Async Observer is a Rails plugin that provides deep integration with Beanstalk. beanstalkd is a fast, distributed, in-memory work-queue service. Its
2006 Apr 18
7
[Prototype] evalScripts not working for me
I think I am experiencing the variable scope problem with evalScripts. I have this block of code being returned from an Ajax.Updater call, as shown by FireBug or one of those other Firefox plugins. I have tried to boil it down to the minimum code. <script type="text/javascript"> test = function() { alert("test"); }; </script> <table
2006 Apr 06
1
observer doesn''t react
i followed the observer documentation [1] and created, and registered an observer. i had to realise that the observer doesn''t work at all -- in fact the rails application does not even start -- with acts_as_taggable, for whatever reason. i must admit that i''m still using ruby 1.8.2. however, after commenting the acts_as_taggable instruction out the application runs smoothly
2005 Dec 07
3
ActiveRecord::Observer problem
Hi all, I have a problem with an observer. I have a simple observer... class ActivityObserver < ActiveRecord::Observer observe Customer def after_create(model) bind_params(model) @al.action = "create" @al.save logger "#{model.id} : created" end private def bind_params(model) @al = ActivityLog.new @al.user_id = User.current.id
2008 Jan 04
3
session auth and AWS auth
Hello I have 2 applications (1 normal, 1 Beast Forum) that set the session domain to be the same so that they can share information between them (they use the same database). However, i am not 100% clear on how I can expose the controller methods to each of them through normal HTTP Auth, and keep the normal acts_as_authenticated pieces in place at the same time? Is there a way to distinguish
2006 Aug 29
0
mongrel_upload_progress problems
What is the status of the mongrel_upload_progress gem and Rails? I have been playing around with _why and technoweenie''s code but I''m not sure what is current and what is old. It is not working for me. I am running Mongrel 0.3.13.3 (gem) with mongrel_upload_progress 0.1. My upload URI is /agronomics/sample_cycle/upload, and my progress URI is
2005 Nov 02
4
acts_as_metadata?
I''m running into the need (on at least one project now) to implement end-user-customizable "metadata" or properties on model objects. The standard example would be a Person class that had first_name, last_name, etc. but would need to be extended real-time (through the web admin interface) with properties such as phone_number : varchar (30). I''ve done some basic
2007 Oct 06
1
2.0 release train and a tiny ARes fix needs review
Are we too late for minor fixes to hop onto the Rails 2.0 train? This little guy needs some +1 love. He adds ARes::Base#to_param: http://dev.rubyonrails.org/ticket/9557 Cheers, Brad --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to
2006 Jul 18
7
Observer not working
Help please. I''m trying to observe a User class, but I can''t get this to work, the after_create method never gets called... (the breakpoint never gets called) app/models/user_observer.rb: class UserObserver < ActiveRecord::Observer def after_create(user) breakpoint setting =
2007 Feb 21
1
setting session data from a post
I''m using acts_as_authenticated, and I''m trying to run some tests where the user must be registered. In the past, I''ve just included a user id in the session data. def test_login_loads_from_post_session post :new, nil, { :user => 7 } session = assigns(:session) assert_equal 7, session[:user] end My assert statement seems to be failing because my session is
2006 Nov 13
6
mongrel_upload_progress question/possible suggestion
Hey all, First off, thanks to Rick Olson and whoever else was involved with this plugin... It''s been amazingly easy to implement. I''ve got a question about the path_info parameter, though... It seems that unless the request PATH_INFO exactly matches the path_info passed in to the plugin at inclusion, it won''t actually trigger Add and add the upload to the list of
2006 Nov 04
3
role based authorization question
I am using the the authorization recipe outlined in Rails Recipes.Is it possible for one role, say ''admin'', to have access to every action on every controller without explicitly having to create a Right for each? I know this will not work as is, and to force it to do so would violate MVC, but is there some other way to accomplish having something like this in a controller: