slate-studio / activeadmin-settings

Settings backend for activeadmin based projects - pretty handy tool.
88 stars 65 forks source link

Make it possible to completely remove value #6

Closed rlupiichuk closed 11 years ago

rlupiichuk commented 11 years ago

If there is default value for setting, deletion of it will lead to showing of it, not the empty string.

rlupiichuk commented 11 years ago

The possible solution can be following. We can make 2 values: default_value & initial_value. So that initial_value will be deleteable.

alexkravets commented 11 years ago

Please add some using case here. Not clear what is y The difference between default and initial value.

On Nov 9, 2012, at 8:09 AM, luckyjazzbo notifications@github.com wrote:

If there is default value for setting, deletion of it will lead to showing of it, not the empty string.

— Reply to this email directly or view it on GitHub.

rlupiichuk commented 11 years ago

1) Lets assume that there is some huge text and there are mentions of company in it and company is editable. For this case it is reasonable to have default_value, because if it will be completely removed the huge text become nonsense.

2) Lets assume that there is Citations on the bottom of the page and at some point the user wants to delete them, because there are no references to other sites at all any more. In this case there should not be default_value just the initial_value which the user should be able to completely remove.

Is it clear enough?

rlupiichuk commented 11 years ago

But it's just a possible solution. I've just realized that it's not the easiest one. Maybe adding a field like "required" will be more clear and solve this issue.