Skip to content

Commit

Permalink
change csrf
Browse files Browse the repository at this point in the history
  • Loading branch information
apprentice1988 committed Oct 24, 2015
1 parent 65868b8 commit 888c814
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
10 changes: 10 additions & 0 deletions config/deploy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,16 @@
end
end

desc "Show server logs"
task :logs do
if rails_env == 'production'
queue 'echo "Production logs:"'
elsif rails_env == 'staging'
queue 'echo "Staging logs:"'
end
queue! "tail -f -n 50 #{deploy_to}/#{current_path}/log/#{rails_env}.log"
end

desc "Sever restart"
task :restart do
queue 'echo "Server restarting..."'
Expand Down
2 changes: 1 addition & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
resources :projects do
member do
post 'start'
post 'checkin'
get 'checkin'
post 'validate'
end
end
Expand Down
6 changes: 6 additions & 0 deletions lib/tasks/mock_data.rake
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,10 @@ namespace :db do
Project.find_by(address: '昙华林').create_puzzle(content: '艺术沙龙', hint: '钱基博所居住的房间', answer: SecureRandom.base64(32))
Project.find_by(address: '青年大教堂').create_puzzle(content: 'row2pa', hint: 'PathSource', answer: SecureRandom.base64(32))
end

task add_location_info: :environment do
Project.find(address: '昙华林').update_attributes(location: '武昌区昙华林三义村特1号')
Project.find(address: '青年大教堂').update_attributes(location: '武汉光谷世界城意大利风情街')
Project.find(address: '红楼').update_attributes(location: '武汉市武昌区武珞路1号')
end
end

0 comments on commit 888c814

Please sign in to comment.