app/controllers/effective/regions_controller.rb in effective_regions-1.6.7 vs app/controllers/effective/regions_controller.rb in effective_regions-1.6.8

- old
+ new

@@ -56,11 +56,11 @@ to_save.save! end # Hand off the appropriate params to EffectivePages gem if defined?(EffectivePages) && params[:effective_menus].present? - Effective::Menu.update_from_effective_regions!(params[:effective_menus]) + Effective::Menu.update_from_effective_regions!(menu_params) end response[:refresh] = true if refresh_page render :json => response.to_json(), :status => 200 @@ -134,9 +134,17 @@ view_context.instance_exec(region, (regionable || :global), &EffectiveRegions.before_save_method) elsif EffectiveRegions.before_save_method.kind_of?(Symbol) self.instance_exec(self, region, (regionable || :global), &EffectiveRegions.before_save_method) end + end + + def menu_params + begin + params.require(:effective_menus).permit! + rescue => e + params[:effective_menus] + end end end end