Here is my class: (stored at \app\controllers\students
\sessions_controller.rb)
class Students::SessionsController < Devise::SessionsController
def create
# this method is not called
super
end
end
here is my routes.rb
devise_for :students, :controllers => { :sessions => "students/
sessions" }
class Devise::SessionsController i stored at:
D:\RailsInstaller\Ruby1.9.2\lib\ruby\gems\1.9.1\gems\devise-1.4.8\app
\controllers
but, overridden "create" is never called! instead, only the "create"
at super class is called
any idea ?
Here is the view:
<h2>Sign in </h2>
<%= form_for(resource, :as => resource_name, :url =>
session_path(resource_name)) do |f| %>
<div><%= f.label :email %><br />
<%= f.email_field :email %></div>
<div><%= f.label :password %><br />
<%= f.password_field :password %></div>
<% if devise_mapping.rememberable? -%>
<div><%= f.check_box :remember_me %> <%= f.label :remember_me %></
div>
<% end -%>
<div><%= f.submit "Sign in" %></div>
<% end %>
<%= render :partial => "devise/shared/links" %>
On Nov 20, 2:13 pm, Carlos Antonio da Silva
<carlosantoniodasi...@gmail.com> wrote:
> I believe it should work fine with this config, I couldn't get anything
> wrong at a glance, just make sure you restart the server.
>
> > <http://del.icio.us/thiagocifani>
>
> --
> At.
> Carlos Antonio
and deleted all other lines for :students at routes.rb, and it worked!
On Nov 20, 2:13 pm, Carlos Antonio da Silva
<carlosantoniodasi...@gmail.com> wrote:
> I believe it should work fine with this config, I couldn't get anything
> wrong at a glance, just make sure you restart the server.
>