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

  • Home
  • SEARCH
  • 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 5974083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:53:34+00:00 2026-05-22T20:53:34+00:00

I want to be able to change dynamically the view folder. The aim is

  • 0

I want to be able to change dynamically the view folder. The aim is to be able to change completely the web design depending on the request. I am thinking about something like this :

 Class PagesController

     default_views_path(current_theme_path)

     def show
         Blablah...
     end

 end

Supposing a directory architecture like this :

 -apps
 --views
 ---theme 1/show.html.erb
 ---theme 2/show.html.erb
 ---theme 3/show.html.erb

I search over the web and I have found preprend_view_path. (:deprecated) Do you think this is a good idea ot use this ? Any feedback ?

EDIT

In fact, I want to simplify this :

 Class PagesController

     def show
         render "#{current_theme}/show"
     end

     def edit
         render "#{current_theme}/edit"
     end

     def list
         render "#{current_theme}/list"
     end

     def index
         render "#{current_theme}/index"
     end

 end

Any Solutions ?

  • 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-05-22T20:53:35+00:00Added an answer on May 22, 2026 at 8:53 pm

    You could use append_view_path. In fact, there is a comment on this append_view_path page where someone has used it for theming.

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

Sidebar

Related Questions

I want to be able to dynamically change what divs are show using radio
I want to be able to change the status message for Live Messenger, but
As the title suggests. I want to be able to change the label of
All I want is to be able to change the color of a bullet
I want to be able to view a SQL Server 2005 Reporting Services report
I want to be able to change all the anchor's properties on a page.
I'm using sub-classed QGraphicsView's in an MDIArea I want to be able to change
I want to be able to change the html of the LI tag using
I want to be able to change the content of a certain div according
I have two overlay images that I want show in camera view depending on

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.