Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/devise_customization_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def column_names_string
end

def protect_from_forgery_code
"protect_from_forgery with: :exception"
"skip_forgery_protection"
end

def columns
Expand Down
8 changes: 8 additions & 0 deletions lib/generators/draft/devise/devise_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ def devise_install
end
end

def enable_get_sign_out
path = "config/initializers/devise.rb"
uncomment_lines(path, /.*config.sign_out_via = :delete/)
code_to_replace = "config.sign_out_via = :delete"
replace_with = "config.sign_out_via = :get"
gsub_file(path, code_to_replace, replace_with)
end

def enable_scoped_views
path = "config/initializers/devise.rb"
uncomment_lines(path, /.*config.scoped_views = false/)
Expand Down