search for: iamnan

Displaying 6 results from an estimated 6 matches for "iamnan".

Did you mean: adnan
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
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
2010 Aug 24
0
Rails 3 Observer: No support for after_commit?
Rails 3 adds after_commit and after_rollback callbacks, but it appears they are not available as methods in an Observer. Is that the way it''s supposed to be, an oversight, or am I doing it wrong? Thanks. -- 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
2012 Apr 13
0
Scoped attr_accessible not working?
Please refer to the ActiveModel MassAssignmentSecurity api<http://api.rubyonrails.org/classes/ActiveModel/MassAssignmentSecurity/ClassMethods.html>for this. I''m on Rails3.2.3/Ruby1.9.3 and trying to use that technique in the controller as described. It is supposed to dynamically restrict the attributes that can be mass assigned. However, sanitize_for_mass_assignment is ignoring
2013 Mar 23
0
Rails4 and ActionMailer::Base.deliveries
Can someone who is working with Rais 4 verify if ActionMailer::Base.deliveries returning valid data or an empty set? I''m looking at the ActiveMailer source code and changelog and nothing jumps out at me. This is with the same code and configuration that worked for me in Rails 3.x but now with Rails 4.0.0.beta1 and Ruby 1.9.3p374. delivery_method is set to :test in both my