Quantcast

Active Admin help

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Active Admin help

Padmoja Roy
 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
        

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/3-RUTIoYBUcJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Active Admin help

Cees Zeelenberg
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'[hidden email]', @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/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Loading...