sql - Rails 3.2.13: Create method not working on a model in cloned rails app from github -


i've cloned remote repo containing rails app github, , i'm getting unfamiliar errors when trying create , save objects database.

i've made signup form create new user (called mentor, here) , instead of creating on submit, i'm getting errors fields blank , when check server logs, i'm seeing instead of normal insert into (also happens using mentor.create in rails console well):

(0.1ms)  begin transaction  mentor exists (0.2ms)  select 1 one "mentors" "mentors"."email" null limit 1 (0.1ms)  rollback transaction 

i have run rails new ~/cloned_repo of requisite rails files should have been created.

any appreciated. thanks!

update controller code:

 def new    @mentor = mentor.new  end   def create   @mentor = mentor.new(params[:mentor])    if @mentor.save      session[:mentor_id] = @mentor.id      redirect_to root_url, notice: "thank signing up!"    else      render "new"    end  end 

change params[:mentor]) params[:mentor]


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -