views:

15

answers:

1

Using restful_authentication and

before_filter :login_required, :only=> [:create]

on controller:

Is it possible to store data from form, and after user logged in, continue with 'create'?

So i mean:

  1. User logged off and he see Somecontroller#new
  2. Then he fill in the form
  3. Then he press "Save"
  4. As we have login_required, user now has to login.
  5. After login the 'create' action continues, and user should be redirected to some path (which set on create action)

If no, how such system ca be done?

The main idea is smooth flow — so unregister user don't have to signup first, he can do that during "create" action.

Many thanks!

A: 

You can store the data with YAML in the session hash. After they login, you can then redirect back to the form action and retrieve values from session, or create the resource, or do whatever you need to do.

AboutRuby