"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "app/controllers/admin/themes_controller.rb" between
discourse-2.2.0.tar.gz and discourse-2.2.1.tar.gz

About: Discourse is a "next-generation" forum platform for community discussions.

themes_controller.rb  (discourse-2.2.0):themes_controller.rb  (discourse-2.2.1)
skipping to change at line 212 skipping to change at line 212
else else
format.json do format.json do
error = @theme.errors.full_messages.join(", ").presence error = @theme.errors.full_messages.join(", ").presence
error = I18n.t("themes.bad_color_scheme") if @theme.errors[:color_sche me].present? error = I18n.t("themes.bad_color_scheme") if @theme.errors[:color_sche me].present?
error ||= I18n.t("themes.other_error") error ||= I18n.t("themes.other_error")
render json: { errors: [ error ] }, status: :unprocessable_entity render json: { errors: [ error ] }, status: :unprocessable_entity
end end
end end
end end
rescue RemoteTheme::ImportError => e
render_json_error e.message
end end
def destroy def destroy
@theme = Theme.find(params[:id]) @theme = Theme.find(params[:id])
StaffActionLogger.new(current_user).log_theme_destroy(@theme) StaffActionLogger.new(current_user).log_theme_destroy(@theme)
@theme.destroy @theme.destroy
respond_to do |format| respond_to do |format|
format.json { head :no_content } format.json { head :no_content }
end end
 End of changes. 1 change blocks. 
0 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)