Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8978843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:42:17+00:00 2026-06-15T19:42:17+00:00

I have some actions in other directory (admin/) but how can i redirect to

  • 0

I have some actions in other directory (admin/) but how can i redirect to vin_questions path, which is in admin controller? now it gives me error

Template is missing

my code

def create
    @va = VinAnswer.new(params[:vin_answer])
    @va.vin_question_id  = params[:vin_question_id]
    @va.save
    render :layout => 'admin'
    redirect_to  admin_vin_questions_path
  end

and part of routes (rake routes)

 admin_vin_questions GET    /admin/vin_questions(.:format)                                            admin/vin_questions#index
                                POST   /admin/vin_questions(.:format)                                            admin/vin_questions#create
         new_admin_vin_question GET    /admin/vin_questions/new(.:format)                                        admin/vin_questions#new
        edit_admin_vin_question GET    /admin/vin_questions/:id/edit(.:format)                                   admin/vin_questions#edit
             admin_vin_question GET    /admin/vin_questions/:id(.:format)                                        admin/vin_questions#show
                                PUT    /admin/vin_questions/:id(.:format)                                        admin/vin_questions#update
                                DELETE /admin/vin_questions/:id(.:format)                                        admin/vin_questions#destroy

but what’s wrong? how redirect to /admin/vin_questions?

upd

Template is missing

Missing template admin/vin_answers/create, application/create with {:locale=>[:ru], :formats=>[:html], :handlers=>[:erb, :builder, :coffee, :haml]}. Searched in: * "/media/_Projects/Oleg/app/views" * "/home/pavel/.rvm/gems/ruby-1.9.3-p194/gems/kaminari-0.14.1/app/views" * "/home/pavel/.rvm/gems/ruby-1.9.3-p194/gems/devise-2.1.2/app/views"
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T19:42:18+00:00Added an answer on June 15, 2026 at 7:42 pm

    Try:

    def create
      @va = VinAnswer.new(params[:vin_answer])
      @va.vin_question_id  = params[:vin_question_id]
      if @va.save
        redirect_to  admin_vin_questions_path # redirect if saved.
      else
        render :layout => 'admin'  # stay here.
      end
    end
    

    And set layout in vin_questions controller if it has not.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a class that I need to perform some actions on but I
I have recently started programming for the iOS Platform but now I need some
I have some not understanding actions from gnu clisp Suppose, I have some code
I have an issue with System.Threading.Timer. I am scheduling some actions using a time
I have an admin section that has a sub-directory of the controllers directory. I.e.,
I have a Java class which can be called from shell. (via java [command][options])
I have a tableView which lists the contents of my document directory. I have
I have some folders in my server where i have several scripts which use
I have a web application from which emails should be sent after specific actions.
I have a script called 'sess-start.php' which lies in an /include directory within my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.