We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4508600 + bbc39c4 commit 1e47eb5Copy full SHA for 1e47eb5
2 files changed
lib/alchemy/configuration.rb
@@ -68,6 +68,8 @@ def to_h
68
).to_h
69
end
70
71
+ delegate :to_json, to: :to_h
72
+
73
class << self
74
def defined_configurations = []
75
spec/libraries/alchemy/configuration_spec.rb
@@ -290,6 +290,12 @@
290
uploader: {file_size_limit: 100, upload_limit: 50}
291
)
292
293
294
+ it "can be converted to JSON" do
295
+ expect(configuration.to_json).to eq(
296
+ '{"uploader":{"file_size_limit":100,"upload_limit":50}}'
297
+ )
298
+ end
299
300
301
describe "#preview_sources" do
0 commit comments