RailsCasts Pro episodes are now free!

Learn more or hide this

Brendan Stennett's Profile

GitHub User: HuffMoody

Site: http://unknowncollective.com

Comments by Brendan Stennett

Avatar

I don't believe Ryan has done one that focuses on just creating the to do list, but some good example of similar behaviour is when he was going through various javascript frameworks.

In Backbone.js
http://railscasts.com/episodes/323-backbone-on-rails-part-1
http://railscasts.com/episodes/325-backbone-on-rails-part-2

In Ember:
http://railscasts.com/episodes/408-ember-part-1
http://railscasts.com/episodes/410-ember-part-2

In AngularJS:
http://railscasts.com/episodes/405-angularjs

Avatar

By using these rich javascript frameworks you only lessen the requirement of ActionView from the rails stack, there is still tremendous use for the rest of the stack. Especially when view rendering is usually a substantial chunk of your entire response times...

Avatar

You could store the guest_user_id as a session variable, logout the guest then direct them to a sign up form. After that, generate the devise registrations controller, and do something along the lines of:

ruby
after_filter :transfer_guest_information, only: [:create]

private
def transfer_guest_information
  if session[:guest_user_id]
    guest = User.find(session[:guest_user_id])
    current_user.move_from(guest)
    session[:guest_user_id] = nil
  end
end

Hope this helps!

Avatar

If you do it the way episode #237 does it you will be good.

Avatar

Great episode!

I had to modify the rake autocompletion a bit to suppress an error "No such file or directory .rake_tasks~" in a directory that didn't contain .rake_tasks~ already.

Just directed standard error to /dev/zero (or it would be /dev/null if you are on a linux box)
http://pastie.org/3041568