views:

303

answers:

4

Hi there; I'm looking for giving the ability to user to modify code in a minimal part of a rails app, part that is located in the app directory. I'm stuck with the "not reload anything automatically in production", is there a way to avoid it ?

(talking about "user's template customization"; is liquid a way through this problem ? don't seem so , but still, could be).

thanks if any help.

+2  A: 

Allow a user to modify code!? WTF!?

In other words, I would highly recommend against that. :)

fig
lol; might not have explained it well, it's not really about the code, but more something to give user the best solution to customize a page.
Ben None
In that case all you want is what the other comments say about storing user prefs in the database. That way you can adjust your app's behavior, but only within the safe limits that you choose.
fig
A: 

You could deploy your application in development mode...

But then again, like fig-gnuton said, you should not do that, there must be a better way of doing what you're trying to do.

marcgg
A: 

Surely thats what variables and the database is for? Storing user preferences and using those preferences to alter what is output onto the users browser.

By template customization do you mean the .html.erb files? Why can't you use CSS to do this by using some sort of body class madness.

Omar Qureshi
A: 

I would suggest you to not let users change app contents. Instead, if you want users to change the templates, you should store them in the database. Just like the browsercms and Radiant projects, to mention some, do.