2013-02-05 14:16:51 -05:00
|
|
|
class Admin::SiteSettingsController < Admin::AdminController
|
|
|
|
|
|
|
|
def index
|
2013-02-07 10:45:24 -05:00
|
|
|
@site_settings = SiteSetting.all_settings
|
2013-02-05 14:16:51 -05:00
|
|
|
render_json_dump(@site_settings.as_json)
|
|
|
|
end
|
|
|
|
|
2013-02-07 10:45:24 -05:00
|
|
|
def update
|
2013-02-05 14:16:51 -05:00
|
|
|
requires_parameter(:value)
|
|
|
|
SiteSetting.send("#{params[:id]}=", params[:value])
|
|
|
|
render nothing: true
|
2013-02-07 10:45:24 -05:00
|
|
|
end
|
2013-02-05 14:16:51 -05:00
|
|
|
|
|
|
|
end
|