Skip to content

Commit 705cae1

Browse files
committed
closes #94
1 parent 8b80efa commit 705cae1

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

change-log.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1919
+ [#89](https://github.com/hyperstack-org/hyperstack/issues/89) Automatically create ActiveRecord inverse relationships as needed. Previously both sides of the relationship had to be declared.
2020
+ [#90](https://github.com/hyperstack-org/hyperstack/issues/90) Automatically load `config/initializers/inflections.rb` if present
2121
+ [#99](https://github.com/hyperstack-org/hyperstack/issues/99) Better diagnostics for server access violations and other errors
22+
+ [#94](https://github.com/hyperstack-org/hyperstack/issues/94) `Hyperstack.anti_csrf_token` returns the stack specific anti_csrf_token.
2223

2324
### Changed
2425
+ [#62](https://github.com/hyperstack-org/hyperstack/issues/62) jQuery now accessed by global `jQ` method (replacing `DOM` class)

ruby/hyper-operation/lib/hyper-operation/transport/client_drivers.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ module Hyperstack
66
# We use ERB to determine the configuration and implement the appropriate
77
# client interface to sync_change or sync_destroy
88

9+
def self.anti_csrf_token
10+
ClientDrivers.opts[:form_authenticity_token]
11+
end
12+
913
class Application
1014
extend Component::IsomorphicHelpers::ClassMethods
1115

ruby/hyper-operation/spec/aaa_run_first/transports_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ def connect(*args)
7474
wait_for_ajax
7575
end
7676

77+
it 'has a anti_csrf_token' do
78+
expect_evaluate_ruby('Hyperstack.anti_csrf_token').to be_present
79+
end
80+
7781
context "Pusher-Fake" do
7882
before(:all) do
7983

0 commit comments

Comments
 (0)