File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
demo/rails/config/initializers Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 1+ Hcaptcha . configure do |config |
2+ config . site_key = Rails . application . credentials . hcaptcha [ :site_key ]
3+ config . secret_key = Rails . application . credentials . hcaptcha [ :secret_key ]
4+ end
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ def self.hcaptcha(options)
1919 html << %(<div #{ tag_attributes } ></div>\n )
2020
2121 html << <<-HTML
22- < div class ="h-captcha " data-sitekey ="1161d0be-1130-4af5-8999-b6fa8894e2a8 "> </ div >
22+ < div class ="h-captcha " data-sitekey ="#{ Hcaptcha . configuration . site_key! } "> </ div>
2323 HTML
2424
2525 html . respond_to? ( :html_safe ) ? html . html_safe : html
@@ -80,7 +80,7 @@ def self.to_message(_key, default)
8080 attributes . merge! data_attributes
8181
8282 # The remaining options will be added as attributes on the tag.
83- attributes [ "class" ] = "g- hcaptcha #{ class_attribute } "
83+ attributes [ "class" ] = "hcaptcha #{ class_attribute } "
8484 tag_attributes = attributes . merge ( options ) . map { |k , v | %(#{ k } ="#{ v } ") } . join ( " " )
8585
8686 [ html , tag_attributes ]
You can’t perform that action at this time.
0 commit comments