File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
lib/active_record/session_store Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -80,15 +80,21 @@ def loaded?
8080
8181 private
8282 def serialize_data!
83- return false unless loaded?
83+ unless loaded?
84+ return false if Rails ::VERSION ::MAJOR < 5
85+ throw :abort
86+ end
8487 write_attribute ( @@data_column_name , self . class . serialize ( data ) )
8588 end
8689
8790 # Ensures that the data about to be stored in the database is not
8891 # larger than the data storage column. Raises
8992 # ActionController::SessionOverflowError.
9093 def raise_on_session_data_overflow!
91- return false unless loaded?
94+ unless loaded?
95+ return false if Rails ::VERSION ::MAJOR < 5
96+ throw :abort
97+ end
9298 limit = self . class . data_column_size_limit
9399 if limit and read_attribute ( @@data_column_name ) . size > limit
94100 raise ActionController ::SessionOverflowError
You can’t perform that action at this time.
0 commit comments