ajax_error_renderer 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/ajax_error_renderer.rb +2 -2
- data/lib/ajax_error_renderer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74c3bea151360e5fd94ff5b4e4cf666dea499628e5a3985af94ad53ac0515aeb
|
4
|
+
data.tar.gz: 2e4b67917e6e7005117c405fc082f8590c2eb3f70bf1a6bd8c071ac185f0f32e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b5b4e06d20d9544870e894233ca4c1b4e2776f7f14b6cb330b49c209ec42586fbf5cbe8fdf6fa8e9745864a192182d7364571cfb60190b885bc00dce7aff679
|
7
|
+
data.tar.gz: de11bdf7531d75639ab2ef7e126984727cf5788a2631f445b99780d3f539a1aff1407a71521847afe38ebf13b0bf013efb0439b0dcfbcc9e5b2ea059f8f9ca8a
|
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# AjaxErrorRenderer
|
2
2
|
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/ajax_error_renderer.svg)](https://badge.fury.io/rb/ajax_error_renderer)
|
4
|
+
|
3
5
|
[![CircleCI](https://circleci.com/gh/willnet/ajax_error_renderer/tree/master.svg?style=svg)](https://circleci.com/gh/willnet/ajax_error_renderer/tree/master)
|
4
6
|
|
5
7
|
AjaxErrorRenderer is a validation error renderer for ajax request.
|
data/lib/ajax_error_renderer.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
require "ajax_error_renderer/engine"
|
2
2
|
|
3
3
|
module AjaxErrorRenderer
|
4
|
-
def render_ajax_error(location: '#error', model:)
|
4
|
+
def render_ajax_error(location: '#error', model:, status: 422)
|
5
5
|
@location = location
|
6
6
|
@model = model
|
7
|
-
render 'ajax_errors/error', formats: :js
|
7
|
+
render 'ajax_errors/error', formats: :js, status: status
|
8
8
|
end
|
9
9
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ajax_error_renderer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- willnet
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11-
|
11
|
+
date: 2018-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|