You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[9] pry(main)> customer.first_name = "Wheeeee"
=> "Wheeeee"
[10] pry(main)> customer.save
From: /Users/xxxxxxx/Development/xxxxxxxx/config/initializers/arproxy.rb @ line 7 Readonly#execute:
2: def execute(sql, name=nil)
3: if sql =~ /\s*(SELECT|SET|SHOW|DESCRIBE)\b/
4: super sql, name
5: else
6: binding.pry
=> 7: Rails.logger.warn "#{name} (BLOCKED) #{sql}"
8: end
9: end
[3] pry(#<Readonly>)> sql
=> "BEGIN"
[4] pry(#<Readonly>)> c
(BLOCKED) BEGIN
SQL (1.3ms) UPDATE "customers" SET "first_name" = $1, "updated_at" = $2 WHERE "customers"."id" = $3 [["first_name", "Wheeeee"], ["updated_at", "2016-03-04 15:57:59.788986"], ["id", "f86d3094-a36f-499b-92ee-a78a76168750"]]
From: /Users/xxxxxxx/Development/xxxxxxxx/config/initializers/arproxy.rb @ line 7 Readonly#execute:
2: def execute(sql, name=nil)
3: if sql =~ /\s*(SELECT|SET|SHOW|DESCRIBE)\b/
4: super sql, name
5: else
6: binding.pry
=> 7: Rails.logger.warn "#{name} (BLOCKED) #{sql}"
8: end
9: end
[4] pry(#<Readonly>)> sql
=> "COMMIT"
[5] pry(#<Readonly>)> c
(BLOCKED) COMMIT
=> true
Any pointers how I could make this truly read-only? I'm using the PostgreSQLAdapter instead of MySQL as you have in your example, if that makes any difference. Thanks!
The text was updated successfully, but these errors were encountered:
I followed the Readonly Access example in the readme and found that updates still managed to be written:
Any pointers how I could make this truly read-only? I'm using the PostgreSQLAdapter instead of MySQL as you have in your example, if that makes any difference. Thanks!
The text was updated successfully, but these errors were encountered: