RailsCasts Pro episodes are now free!

Learn more or hide this

Jesse's Profile

GitHub User: whithajess

Site: http://blog.jessewhitham.co.nz/

Comments by Jesse

Avatar

So after spending a bit of time looking at Active Model I realized that my main problem was with the persisted? method always being false (when your controller has new, and update methods like that of #217 this becomes a problem as it always thinks it is creating a new object rather then using the already created one) the solution I had for this was to use ids and change the persisted method to this:

persisted model method
  def persisted?
    !(self.id.nil?)
  end
Avatar

Hi There, thanks for the rail cast I am wondering if anyone has had experience with using ActiveModel like the #219 Rails Cast as it would be better if I could do this without the Active Record database creation, as well as possibly removing the sessions to be used in memcache instead, it seems there isn't a lot of info on this and would be very appreciative for any help someone can offer!

Avatar

Hi There, thanks for the rail cast I am wondering if anyone has had experience with using these in multi step forms like that of the #217 Rails Cast as it would be better if I could do this without the Active Record database creation, as well as possibly removing the sessions to be used in memcache instead, it seems there isn't a lot of info on this and would be very appreciative for any help someone can offer!