2018-03-25 16:15:39 +00:00
|
|
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
2018-03-25 17:30:42 +00:00
|
|
|
module Nonprofits
|
|
|
|
class MiscellaneousNpInfosController < ApplicationController
|
|
|
|
include NonprofitHelper
|
|
|
|
|
|
|
|
helper_method :current_nonprofit_user?
|
|
|
|
before_filter :authenticate_nonprofit_user!
|
|
|
|
|
|
|
|
def show
|
|
|
|
respond_to do |format|
|
|
|
|
format.json do
|
|
|
|
render_json { FetchMiscellaneousNpInfo.fetch(params[:nonprofit_id]) }
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
def update
|
|
|
|
respond_to do |format|
|
|
|
|
format.json {
|
|
|
|
render_json {
|
|
|
|
update = UpdateMiscellaneousNpInfo.update(params[:nonprofit_id], params[:miscellaneous_np_info])
|
|
|
|
#flash[:notice] = "Your Miscellaneous Settings have been saved"
|
|
|
|
update
|
|
|
|
}
|
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|