D
D
dexdev2013-12-09 16:20:01
Ruby on Rails
dexdev, 2013-12-09 16:20:01

Rails 4 and devise: how to set render for devise?

Good day to all, in my app I want to make a crop like RyanB railscasts.com/episodes/182-cropping-images?view=a... but I can’t figure out how to set the devise to render :crop, tell me experts how to do it?
The joke is that, after the create and update actions, it is necessary to make render to: crop, is this done in the created users_controller.rb, or do you need to change it somewhere in the devise itself?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sdevalex, 2013-12-09
@AdilA

It can be so.

class RegistrationController < Devise::RegistrationController
  def create
    # ... что-то своё перед созданием
    super
    # ... что-то своё после создания
  end

   ...
end

# config/routes.rb
devise_for :users, :controllers => { :registrations => "registration" }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question