Skip to content

Commit 1490e35

Browse files
authored
Merge pull request #10 from BrandonShar/fix-pre-mattr-default
Use old version of default syntax for Rails 5.2
2 parents d58c47f + eb54fee commit 1490e35

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/inertia_rails/inertia_rails.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module InertiaRails
2-
mattr_accessor :shared_plain_data, default: {}
3-
mattr_accessor :shared_blocks, default: []
2+
mattr_accessor(:shared_plain_data) { Hash.new }
3+
mattr_accessor(:shared_blocks) { [] }
44

55
def self.configure
66
yield(Configuration)
@@ -31,8 +31,8 @@ def self.share_block(block)
3131
private
3232

3333
module Configuration
34-
mattr_accessor :layout, default: 'application'
35-
mattr_accessor :version, default: nil
34+
mattr_accessor(:layout) { 'application' }
35+
mattr_accessor(:version) { nil }
3636

3737
def self.evaluated_version
3838
version.respond_to?(:call) ? version.call : version

0 commit comments

Comments
 (0)