Active Admin help

25 views
Skip to first unread message

Roy

unread,
May 21, 2012, 2:38:13 AM5/21/12
to rubyonra...@googlegroups.com
 I have installed active admin and also add my model -controller rate_professor there.......I can add/delete/edit data using active admin ...but if I click on submit button of my form in rate_professor controller ... I can see whatever I added in the index page ........but I don't want to see that one.....I want to find the information(whatever I added by clicking submit button)  on the website after reviewing by admin.......Can anyone please help me to fix this.......?It will be great...... here are my codes..

in rate_professors controller:(1:n relationship)
 def create
       @professor=Professor.find(params[:id])
        @rate_professor =@professor.rate_professors.build(params[:rate_professor])
       if @rate_professor.save
      redirect_to rate_professors_index_path(:id=> @professor.id)
       end
  end
end

 def index
    
        @professor=Professor.find(params[:id])
          @rate_professor =@professor.rate_professors.build
  end
        

marco marco

unread,
May 28, 2012, 10:50:34 AM5/28/12
to rubyonra...@googlegroups.com
ActiveRecord::RecordNotUnique in Admin::AdminUsersController#create

ODBC::Error: 23000 (2601) [unixODBC][FreeTDS][SQL Server]Cannot insert
duplicate key row in object 'dbo.admin_users' with unique index
'index_admin_users_on_reset_password_token'.: EXEC sp_executesql
N'INSERT INTO [admin_users] ([created_at], [current_sign_in_at],
[current_sign_in_ip], [email], [encrypted_password], [last_sign_in_at],
[last_sign_in_ip], [remember_created_at], [reset_password_sent_at],
[reset_password_token], [sign_in_count], [updated_at]) VALUES (@0, @1,
@2, @3, @4, @5, @6, @7, @8, @9, @10, @11); SELECT CAST(SCOPE_IDENTITY()
AS bigint) AS Ident', N'@0 datetime, @1 datetime, @2 nvarchar(255), @3
nvarchar(255), @4 nvarchar(255), @5 datetime, @6 nvarchar(255), @7
datetime, @8 datetime, @9 nvarchar(255), @10 int, @11 datetime', @0 =
'2012-05-28T14:47:04.490', @1 = NULL, @2 = NULL, @3 =
N'marco...@gmail.com', @4 = N'', @5 = NULL, @6 = NULL, @7 = NULL, @8
= NULL, @9 = NULL, @10 = 0, @11 = '2012-05-28T14:47:04.490'


error in create new user

--
Posted via http://www.ruby-forum.com/.
Reply all
Reply to author
Forward
0 new messages