search for: after_

Displaying 19 results from an estimated 19 matches for "after_".

Did you mean: after
2006 Feb 11
5
after_(read|find) callback?
...transparently in joins, so user.posts.last.title would do the right thing if title was an encrypted field. I see in the documentation of ActiveRecord::Callbacks there''s a before_save callback that looks like going in the right direction, but I don''t see the symmetric after_(read|find). Any ideas? -- fxn
2015 Apr 05
3
[LLVMdev] alloca not in first bb behaving differently
...e, label %if.then, label %if.else if.then: ; preds = %entry store i32 3, i32* %i %0 = load i32* %i ret i32 %0 if.else: ; preds = %entry ret i32 2 if.end: ; preds = %after_ret1, %after_ ret ret i32 1 after_ret: ; No predecessors! br label %if.end after_ret1: ; No predecessors! br label %if.end after_ret2: ; No predecessors! ret i32 0 } The fol...
2015 Apr 05
2
[LLVMdev] alloca not in first bb behaving differently
...en: ; preds = %entry > store i32 3, i32* %i > %0 = load i32* %i > ret i32 %0 > > if.else: ; preds = %entry > ret i32 2 > > if.end: ; preds = %after_ret1, %after_ > ret > ret i32 1 > > after_ret: ; No predecessors! > br label %if.end > > after_ret1: ; No predecessors! > br label %if.end > > after_ret2:...
2006 Jul 21
1
Capistrano before and after tasks
I try to extend db:test:copy_structure task to poulate test database with some existing data everytime i run it. It seems that "after_" task is not called as should be: > namespace :db do > namespace :test do > task :after_clone_structure do > puts "after_clone_structure_to_test" > end > end > end Anyone know what I am doing wrong? thanks in advance, Bojan Mihelac -- Boja...
2006 Jan 03
2
Stopping a save from the before_save
What''s the better thing to do in a before_save if you don''t want the save to continue? raise an exception, or do an errors.add or both? Thanks, Chris Nolan.ca http://kweschun.com/ - Do you have a Kweschun?
2007 Jan 04
6
after_update attributes problem
Hey guys, I''m having a hard time w/ the after_update callback on rails... As far as I can tell, when I define a after_update callback on a model, the attributes of the object have the same values that they had *before* Base.save was called. I''m probably wrong so here''s the code: UNIT TEST: def test_register_item_adjusts_ac...
2006 Aug 16
4
Deploying only what you need with Capistrano?
The recent Rails security issue highlighted a concern I''ve had about Rails deploys; namely, you shouldn''t deploy anything to production that you don''t need there. Rails apps have a number of scripts--potential security holes or DOS targets in this case--along with all the other application code you need. There''s no reason you should have script/server, console,
2008 Apr 30
6
best practice for object transaction?
I have a new @offer that needs to generate a document if saved. But that''s all or nothing: transaction do @offer.save! generate_document end # handle exceptions if needed If save! fails everything is fine, but if generate_document raises an exception @offer is left as a model with timestamps, id, which is not a new_record? anymore (though the database was
2015 Apr 05
2
[LLVMdev] alloca not in first bb behaving differently
...tore i32 3, i32* %i >> > %0 = load i32* %i >> > ret i32 %0 >> > >> > if.else: ; preds = %entry >> > ret i32 2 >> > >> > if.end: ; preds = >> %after_ret1, %after_ >> > ret >> > ret i32 1 >> > >> > after_ret: ; No predecessors! >> > br label %if.end >> > >> > after_ret1: ; No predecessors! >> >...
2006 Aug 25
7
disabling automatic indexing in acts_as_ferret
I''d like to be able to enable/disable the automatic indexing of documents acts_as_ferret does. Something like MyModel.disable_indexing MyModel.enable_indexing would be perfect. I need this because I do some indexing that requires visiting the parents of the model objects and my import method imports the children first, so the information isn''t there yet. I''d like to
2006 Aug 01
8
Decoupled observers for controllers?
In the Rails Recipes book the recipe "Keeping track of who did what" explains how to do decoupled observing of models. In my application I''d like to do a similar thing but watching the controllers. For example, when somebody hits the login method of the Security controller, I''d like to make a note of it. In this case I could observe the User model and watch for
2006 Jul 06
1
<model>.update(...) not calling before_update callback.
Hi, I''m doing a <model_name>.update(....) but I''m noticing that my before_update callback is not being called. If I do a find and then a save!, I notice that it is called. The problem with a find and save in my case is that I''m not able to set all my attributes in one shot by saving params["user"] and since I can''t do this, my overloaded
2006 Jul 07
0
reintializing a model object to invoke model callbacks
...I want to reinitialize the user object by using the params["user"] but I''d like to intialize it in a way that calls my model''s equality operator to do some sepecial initializations defined as so: # In my model def user=(user) ... end ----- I need to somehow invoke the after_* and before_* callbacks and these apparently don''t get invoked if I do an update like so: user.update(....). It seems like I must do a user.save! to invoke them. Thanks, Saureen. -- Posted via http://www.ruby-forum.com/.
2006 Apr 26
0
Observer method names
I haven''t seen it documented anywhere, but can observer methods be given a prefix in their name like ''after_'' followed by my controller''s method name? For instance I have a couple of methods called ''create'' and ''create_reply''. Can I have ''after_create'' and ''after_create_reply'' in my observer class and expect it...
2006 Feb 19
2
how would you implement this normalizer?
Names of models in my application have accented characters that imply unexpected orderings. For instance ?vila should go before Madrid, but String#<=> puts it the other way aroud. I am only sorting for views, so it would be OK to do some normalization on-the-fly on Ruby land, and since the same criteria has to be used throughout the application I was thinking on some sort of
2007 Apr 10
0
Multiple after_deploys in deploy.rb
Hi, I am using Capistrano to do a deploy to servers with different roles. I want call after_deploy in the following manner. task :after_deploy, :roles => [:rolea] do run "task a" end task :after_deploy, :roles => [:roleb] do run "task b" end The problem seems that the second after_deploy clobbers the first even though they are meant for differen...
2006 Jan 16
1
switchtower custom tasks question.
hi, i''m just getting started using switchtower for deployment. i''m working with a small team of 3 and a hosted subversion repository. i have switchtower working, but i need to create two custom tasks and have those tasks run at deployment. 1) copy a working dispatch.fcgi from another folder, and 2) copy db/database.example to db/database.yml here is what i''ve tried,
2008 Jun 20
7
Kernel panic - not syncing: CPU context corrupt
Hi, Is there someone on this mailing list who could/want help me figure out this issue? We do not know where to look to solve this. --- Description --- This is a brand new server, which has been tested for days with FreeBSD in our office, and a few days with Windows on the site of our hardware distributor. Now customer wants CentOS, which we installed, but after few days we get a kernel panic.
2006 Apr 25
4
Symlinks in Capistrano?
I have a few projects with large directories (say, user-uploaded files) that make using Capistrano a bit awkward. However, I suspect that I may have reached the "write a custom task" level. (I suppose I''m just thinking out loud, here...) It seems as though I''d want this directories symlinked in /shared... Maybe there''s a way to extend the