Displaying 20 results from an estimated 50000 matches similar to: "Rails 3 Observer: No support for after_commit?"
2011 Jan 14
4
Rails 3 / RSpec 2 use_transactional_fixtures and after_commit
We''re migrating a Rails 2.3.x application to Rails 3 and RSpec 2.x.
In Rails 2.3.x we were using
https://github.com/freelancing-god/after_commit to provide
after_commit functionality (now provided by Rails 3).
The plugin version of after_commit came with some helpers to make
testing with `use_transactional_fixtures = true` work.
From: https://github.com/freelancing-god/after_commit
2011 Feb 19
1
undefined method `map' for nil:NilClass for rails 2.3.2
Hai guys!
When i try to do rake gems:install and rake gems:refresh_specs in my app
below error is occurred. please give some solution for this.
config.gem: Unpacked gem authlogic-2.1.3 in vendor/gems has no specification
file. Run ''rake gems:refresh_specs'' to fix this.
rake aborted!
undefined method `map'' for nil:NilClass
enivorment.rb
RAILS_GEM_VERSION =
2012 Aug 01
0
Testable after_commit hooks for rails 4?
https://groups.google.com/d/topic/rubyonrails-core/i2k7dn-jRVg/discussion
What do you think about bringing the possibility to test after_commit hooks 
while also using transactional fixtures to rails 4? Would the approach used 
here https://gist.github.com/1169763 be acceptable?
-- 
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
2010 Jul 14
1
ActiveRecord::Observer, update_all and has_many
Hi,
I''m using an ActiveRecord::Observer to log users changing data in my
application. However, I''ve noted that adding an item to a has_many
relationship gets logged, but removing the item does not. That is:
  @product.users << user
is logged, but:
  @product.users.delete(user)
is not.
I''ve dug into ActiveRecord and found that the underlying issue is that
the
2010 Dec 31
2
why observer can't fire in rspec? help .
I read the guide and api and i created Observer on model, she can run
on rails console of test env.
but when i use rspec , the observer can''t run in, it''s never step in.
some good man help me, please. i debug it use one day and one night, i
can''t sleep in today night unless i solve it.
-- 
You received this message because you are subscribed to the Google Groups
2010 Dec 07
0
A couple of patches
I''ve submitted a couple of patches in Ligththouse.
Provide NoStore implementation of ActiveSupport::Cache::Store
This patch provides a NoStore implementation of
ActiveSupport::Cache::Store suitable for use in development and test
environments where the code need to use the cache interface, but
actually caching data is not desired.
2010 Aug 18
11
When after_save isn't after the save....
I have a Production model, which represents a farmer''s crop. After
create (via after_save) I call a method that creates one or more
Supply models, which represent a week of anticipated product harvest.
After each of those are created, a class method gets called that tries
to match each new Supply with outstanding orders for the same time
period. If a match is made, a transaction (an
2010 Aug 17
0
Dose custom rake task ignore observer?
I have an observer which will do some tidy up work around Model A.
But when I create or destroy A''s instance inside a custom rake task,
the observer seems not get called at all?
Can some one explain this?
-- 
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
2010 Oct 03
1
Rails 3 observers
Rails Guides says:
...the UserObserver ... would be saved as app/models/user_observer.rb
and registered in config/environment.rb this way:
config.active_record.observers = :user_observer
But the observer registration above doesn''t work because there is no
''config''. For now, I''ve put it in the config/environments/[APP_ENV].rb
but that seems really sloppy and
2011 Aug 26
2
Observer for checkbox
Hi!
I want to put a checkbox on my data list in index view, and change his value
on database when I change the value of this chekbox.
Someone know how is the good way for do it?
Thanks!
-- 
*Fernando Aureliano*
-- 
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
2012 Sep 28
1
How the difference between Observer and Sweeper?
I''m think to use any to work with cache. How I should to use.
-- 
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
2012 Dec 06
2
Bye Bye, Observers
Observers will be no more as of Rails 4, farewell, never been much of a 
fan. However, I''m using it in one of my gems which enables model attributes 
for use with a WYSIWYM editor. The resulting markup is persisted, but in 
order to use it in a view, it has to be nokogiried in a helper which 
fragment caches the result. This cache has to be zapped once the model 
instance is either
2012 Apr 25
2
Test oddities
Can someone explain why a instance variable cannot be changed through an 
association under rspec/factory_girl? An example is in this gist<https://gist.github.com/2484336>
.
All tests pass except the last. All the steps pass in the console.
-- 
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web
2012 Jun 01
0
Association callbacks on model observers
Hello all first post so be kind,
Is there a way to use association callbacks on model observers? For 
instance if I have a has_and_belongs_to_many association on my model I can 
add a private method for instance to be called on the :after_add, is there 
a way to move this to an observer I have created for this model?
Thanks
.FxN
-- 
You received this message because you are subscribed to the
2010 Mar 09
1
db:migrate fails after upgrade to Rails 2.3.5
Hi -- I''m upgrading an app from Rails 2.0.2 to 2.3.5 in development on
a Mac OS/X Leopard.  I unfroze the old Rails files, froze the 2.3.5
gem on the machine into the app, and some quick tests of the app
showed no problems.
However, after trying to run rake db:migrate, it fails silently.  Run
with trace I get the output below.  I gather it might be related to
plugin initialization or
2010 Dec 11
0
Rails 3 - Delayed_Job (collectiveidea), trying to Delay Mailers - Error: NoMethodError (undefined method `delay' for UserMailer:Class):
Hello, I have the following in an observer:
    UserMailer.delay.msg_notification(record)
In user_mailer.rb
class UserMailer < ActionMailer::Base
...
def msg_notification(record)
    mail(
          :to => "#{record.user.email}",
          :subject => "Notification"
          )
  end
..
end
But this errors with:
NoMethodError (undefined method `delay'' for
2012 Jan 11
4
Observe field with jquery in Rails 3.1
I tries to observe a change  in a field  with jquery in Rails 3.1 in
order to be able to implement  two cascading select boxes.
A a first step I just try to observe a click in a div using jquery
I have the following function in a .js file that is loadedin the head
section (fieldset is the id of a div) and is displaying a view with
the div fieldset
$(document).ready(function() {
2012 Feb 11
1
rake command shows the error
rails -v=2.3.8
gem -v= 1.4.2
ruby -v=1.8.7
When i issue the "rake" command ,it gives the following error .
(in /home/amrit/amrit/OSV/OpenStreetView)
/usr/bin/ruby1.8 -I"lib:test"
"/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"
"test/functional/main_controller_test.rb"
"test/functional/upload_controller_test.rb"
2010 Nov 05
0
RoR:OSV: Installation issue
I am trying to get a local installation of OpenStreetView, on Ubuntu
10.10
On installing Rails (2.3.8) and OSV code using git, when I issue
"rake" command, I get response, which is reproduced below signature.
What is missing from my installation?
--
.O.C.
$ rake
(in /home/meet/OSV/OpenStreetView)
/usr/bin/ruby1.8 -I"lib:test" "/var/lib/gems/1.8/gems/rake-0.8.7/lib/
2012 Nov 15
3
Getting Involved and Rails 3 Observations
Hello -
I would like to get involved in the Rails Core development. What''s the 
process for getting involved?
We''ve been working with Rails since 2006 and really enjoy the framework but 
have some reservations around Rails 3''s REST implementation and exposed 
Java Script. The former seems to be an over reach for a framework and is an 
application specific architectural