Compare commits

...

33 Commits
dev ... master

Author SHA1 Message Date
lovelyzhang 90385bafcf zy:add document 2017-01-14 18:44:56 +08:00
lovelyzhang 6904dce21e zy: finish 2017-01-14 16:24:53 +08:00
lovelyzhang dc6569c4dd zy: activity show people name 2017-01-14 16:23:53 +08:00
lovelyzhang 790ac40def zy:check for finish 2017-01-14 16:13:23 +08:00
lovelyzhang 49138c748b zy:add sendgird send mail 2017-01-14 15:43:34 +08:00
lovelyzhang 9dad27c6da zy:view routes profile 2017-01-07 12:33:43 +08:00
lovelyzhang c29cd77767 zy: fix add user chat bug 2017-01-07 11:18:42 +08:00
lovelyzhang a4b1ac9448 zy: fix micro_post view activity view bug 2017-01-06 21:15:51 +08:00
lovelyzhang 45c05a4881 zy: fix micro_post view activity view bug 2017-01-06 21:13:28 +08:00
lovelyzhang b601bcf6f1 zy: fix micro_post comments bugs 2017-01-06 21:09:03 +08:00
lovelyzhang 143e384838 zy:change gitignore 2017-01-05 22:15:34 +08:00
lovelyzhang 9bf238a96e merge mail 2017-01-05 22:13:58 +08:00
lovelyzhang d20cb8ec83 zy: add mail send code to change password 2017-01-05 22:07:22 +08:00
lovelyzhang 1746c9dde7 zy:test pic 2017-01-02 23:31:07 +08:00
lovelyzhang 92821cfd87 zy: add verify code 2017-01-02 22:57:19 +08:00
lovelyzhang 2c21dc9142 zy:reset db 2016-12-27 22:39:43 +08:00
lovelyzhang b18ed5c4e0 zy:fix joinactivity 2016-12-27 22:33:37 +08:00
lovelyzhang 40f8bfc049 zy: user only comments and activity finished 2016-12-27 22:21:50 +08:00
lovelyzhang face9b417f zy: delete post 2016-12-27 17:45:57 +08:00
lovelyzhang af26c41a7d zy:modify activity signup and quit 2016-12-27 16:49:34 +08:00
lovelyzhang 4a24c82a0e zy: db migrate 2016-12-27 11:53:07 +08:00
lovelyzhang 11410f9b86 zy: add new column to micro_posts 2016-12-27 11:51:36 +08:00
lovelyzhang b42036399e zy:modify time zone 2016-12-27 11:24:34 +08:00
lovelyzhang 910246f78d zy: new dev feacture 2016-12-27 11:09:27 +08:00
lovelyzhang 25c738414d zy:rm .idead/ sqlite3 2016-12-27 10:54:31 +08:00
lovelyzhang 962900f274 zy:timestamp for pic 2016-12-27 10:46:28 +08:00
lovelyzhang 0b5691a99b zy: change todolist 2016-12-27 10:24:57 +08:00
lovelyzhang 701a151602 Merge branch 'dev' of https://git.trustie.net/zhujingqiao/guoren into dev 2016-12-26 16:33:10 +08:00
lovelyzhang d35c37f7dd zy:modify gitignore 2016-12-26 16:32:37 +08:00
lovelyzhang 5d2d576cdf zy: change gemfile to delete bcrypt-ruby 2016-12-26 16:25:00 +08:00
lovelyzhang 52d6b1bf8f zy heroku deploy 2016-12-26 16:08:03 +08:00
lovelyzhang 0c0f725ec6 zy: heroku deploy 2016-12-26 15:57:40 +08:00
lovelyzhang 9b4215db04 zy: deploy to heroku 2016-12-26 15:55:36 +08:00
54 changed files with 761 additions and 1610 deletions

9
.gitignore vendored
View File

@ -51,8 +51,9 @@ build-iPhoneSimulator/
.rvmrc
# JetBrain的忽略文件
/.idea/*
.idea/*
public/data/*
public/userpics/*
# rails的忽略文件
@ -100,3 +101,9 @@ bower.json
# Ignore Byebug command history file.
.byebug_history
db/*.sqlite3
logs.txt

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Settings><!--This file was automatically generated by Ruby plugin.
You are allowed to:
1. Reorder generators
2. Remove generators
3. Add installed generators
To add new installed generators automatically delete this file and reload the project.
--><GeneratorsGroup><Generator name="assets" /><Generator name="channel" /><Generator name="coffee:assets" /><Generator name="controller" /><Generator name="generator" /><Generator name="helper" /><Generator name="integration_test" /><Generator name="jbuilder" /><Generator name="job" /><Generator name="js:assets" /><Generator name="mailer" /><Generator name="migration" /><Generator name="model" /><Generator name="resource" /><Generator name="scaffold" /><Generator name="scaffold_controller" /><Generator name="task" /><Generator name="test_unit:generator" /><Generator name="test_unit:plugin" /></GeneratorsGroup></Settings>

File diff suppressed because one or more lines are too long

View File

@ -1,194 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="RUBY_MODULE" version="4">
<component name="FacetManager">
<facet type="RailsFacetType" name="Ruby on Rails">
<configuration>
<RAILS_FACET_CONFIG_ID NAME="RAILS_FACET_SUPPORT_REMOVED" VALUE="false" />
<RAILS_FACET_CONFIG_ID NAME="RAILS_TESTS_SOURCES_PATCHED" VALUE="true" />
<RAILS_FACET_CONFIG_ID NAME="RAILS_FACET_APPLICATION_ROOT" VALUE="$MODULE_DIR$" />
</configuration>
</facet>
</component>
<component name="ModuleRunConfigurationManager">
<configuration default="false" name="test: guoren" type="RakeRunConfigurationType" factoryName="Rake">
<module name="guoren" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
<envs>
<env name="RAILS_ENV" value="test" />
</envs>
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
<COVERAGE_PATTERN ENABLED="true">
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
</COVERAGE_PATTERN>
</EXTENSION>
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_NAME" VALUE="test" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ARGS" VALUE="" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ATTACHED_TEST_FRAMEWORKS" VALUE=":test_unit " />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_TRACE" VALUE="false" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_DRYRUN" VALUE="false" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_PREREQS" VALUE="false" />
<method />
</configuration>
<configuration default="false" name="spec: guoren" type="RakeRunConfigurationType" factoryName="Rake">
<module name="guoren" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
<envs />
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
<COVERAGE_PATTERN ENABLED="true">
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
</COVERAGE_PATTERN>
</EXTENSION>
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_NAME" VALUE="spec" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ARGS" VALUE="" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ATTACHED_TEST_FRAMEWORKS" VALUE=":rspec " />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_TRACE" VALUE="false" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_DRYRUN" VALUE="false" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_PREREQS" VALUE="false" />
<method />
</configuration>
<configuration default="false" name="Production: guoren" type="RailsRunConfigurationType" factoryName="Rails">
<predefined_log_file id="RUBY_RAILS_SERVER" enabled="true" />
<module name="guoren" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
<envs />
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
<COVERAGE_PATTERN ENABLED="true">
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
</COVERAGE_PATTERN>
</EXTENSION>
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SCRIPT_ARGS" VALUE="" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="PORT" VALUE="3000" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="IP" VALUE="0.0.0.0" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="DUMMY_APP" VALUE="test/dummy" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RAILS_SERVER_TYPE" VALUE="Default" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ENVIRONMENT_TYPE" VALUE="production" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="LAUNCH_JS" VALUE="false" />
<method />
</configuration>
<configuration default="false" name="Development: guoren" type="RailsRunConfigurationType" factoryName="Rails">
<predefined_log_file id="RUBY_RAILS_SERVER" enabled="true" />
<module name="guoren" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
<envs />
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
<COVERAGE_PATTERN ENABLED="true">
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
</COVERAGE_PATTERN>
</EXTENSION>
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SCRIPT_ARGS" VALUE="" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="PORT" VALUE="3000" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="IP" VALUE="0.0.0.0" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="DUMMY_APP" VALUE="test/dummy" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RAILS_SERVER_TYPE" VALUE="Default" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ENVIRONMENT_TYPE" VALUE="development" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="LAUNCH_JS" VALUE="false" />
<method />
</configuration>
</component>
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/.bundle" />
<excludeFolder url="file://$MODULE_DIR$/components" />
<excludeFolder url="file://$MODULE_DIR$/public/system" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
<excludeFolder url="file://$MODULE_DIR$/vendor/bundle" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" scope="PROVIDED" name="actioncable (v5.0.0.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="actionmailer (v5.0.0.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="actionpack (v5.0.0.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="actionview (v5.0.0.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="activejob (v5.0.0.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="activemodel (v5.0.0.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="activerecord (v5.0.0.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="activesupport (v5.0.0.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="arel (v7.1.4, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="bcrypt (v3.1.11, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="bcrypt-ruby (v3.0.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="builder (v3.2.2, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.13.6, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="byebug (v9.0.6, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="coffee-rails (v4.2.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="coffee-script (v2.4.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="coffee-script-source (v1.11.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="concurrent-ruby (v1.0.2, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="debug_inspector (v0.0.2, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="erubis (v2.7.0, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="execjs (v2.7.0, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="ffi (v1.9.14, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="globalid (v0.3.7, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="i18n (v0.7.0, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="jbuilder (v2.6.0, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="jquery-rails (v4.2.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="listen (v3.0.8, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="loofah (v2.0.3, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="mail (v2.6.4, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="method_source (v0.8.2, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="mime-types (v3.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="mime-types-data (v3.2016.0521, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="mini_portile2 (v2.1.0, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="minitest (v5.9.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="multi_json (v1.12.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="nio4r (v1.2.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="nokogiri (v1.6.8.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="puma (v3.6.2, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rack (v2.0.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rack-test (v0.6.3, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rails (v5.0.0.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rails-dom-testing (v2.0.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rails-html-sanitizer (v1.0.3, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="railties (v5.0.0.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rake (v11.3.0, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rb-fsevent (v0.9.8, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rb-inotify (v0.9.7, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="sass (v3.4.22, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="sass-rails (v5.0.6, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="spring (v2.0.0, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="spring-watcher-listen (v2.0.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="sprockets (v3.7.0, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="sprockets-rails (v3.2.0, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="sqlite3 (v1.3.12, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="thor (v0.19.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="thread_safe (v0.3.5, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="tilt (v2.0.5, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="turbolinks (v5.0.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="turbolinks-source (v5.0.0, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="tzinfo (v1.2.2, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="uglifier (v3.0.3, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="web-console (v3.4.0, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="websocket-driver (v0.6.4, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="websocket-extensions (v0.1.2, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="will_paginate (v3.1.5, rbenv: 2.3.1) [gem]" level="application" />
</component>
<component name="RModuleSettingsStorage">
<LOAD_PATH number="0" />
<I18N_FOLDERS number="1" string0="$MODULE_DIR$/config/locales" />
</component>
</module>

View File

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="rbenv: 2.3.1" project-jdk-type="RUBY_SDK" />
</project>

View File

@ -1,27 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Development: guoren" type="RailsRunConfigurationType" factoryName="Rails">
<predefined_log_file id="RUBY_RAILS_SERVER" enabled="true" />
<module name="guoren" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
<envs />
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
<COVERAGE_PATTERN ENABLED="true">
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
</COVERAGE_PATTERN>
</EXTENSION>
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SCRIPT_ARGS" VALUE="" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="PORT" VALUE="3000" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="IP" VALUE="0.0.0.0" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="DUMMY_APP" VALUE="test/dummy" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RAILS_SERVER_TYPE" VALUE="Default" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ENVIRONMENT_TYPE" VALUE="development" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="LAUNCH_JS" VALUE="false" />
<method />
</configuration>
</component>

View File

@ -1,27 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Production: guoren" type="RailsRunConfigurationType" factoryName="Rails">
<predefined_log_file id="RUBY_RAILS_SERVER" enabled="true" />
<module name="guoren" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
<envs />
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
<COVERAGE_PATTERN ENABLED="true">
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
</COVERAGE_PATTERN>
</EXTENSION>
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SCRIPT_ARGS" VALUE="" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="PORT" VALUE="3000" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="IP" VALUE="0.0.0.0" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="DUMMY_APP" VALUE="test/dummy" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RAILS_SERVER_TYPE" VALUE="Default" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ENVIRONMENT_TYPE" VALUE="production" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="LAUNCH_JS" VALUE="false" />
<method />
</configuration>
</component>

View File

@ -1,25 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="spec: guoren" type="RakeRunConfigurationType" factoryName="Rake">
<module name="guoren" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
<envs />
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
<COVERAGE_PATTERN ENABLED="true">
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
</COVERAGE_PATTERN>
</EXTENSION>
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_NAME" VALUE="spec" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ARGS" VALUE="" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ATTACHED_TEST_FRAMEWORKS" VALUE=":rspec " />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_TRACE" VALUE="false" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_DRYRUN" VALUE="false" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_PREREQS" VALUE="false" />
<method />
</configuration>
</component>

View File

@ -1,27 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="test: guoren" type="RakeRunConfigurationType" factoryName="Rake">
<module name="guoren" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
<envs>
<env name="RAILS_ENV" value="test" />
</envs>
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
<COVERAGE_PATTERN ENABLED="true">
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
</COVERAGE_PATTERN>
</EXTENSION>
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_NAME" VALUE="test" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ARGS" VALUE="" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ATTACHED_TEST_FRAMEWORKS" VALUE=":test_unit " />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_TRACE" VALUE="false" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_DRYRUN" VALUE="false" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_PREREQS" VALUE="false" />
<method />
</configuration>
</component>

View File

@ -1,955 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="585b6f0a-0d20-4a3c-825b-5f85848cbf40" name="Default" comment="">
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/guoren.iml" afterPath="$PROJECT_DIR$/.idea/guoren.iml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/Gemfile" afterPath="$PROJECT_DIR$/Gemfile" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/Gemfile.lock" afterPath="$PROJECT_DIR$/Gemfile.lock" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/controllers/main_controller.rb" afterPath="$PROJECT_DIR$/app/controllers/main_controller.rb" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/helpers/main_helper.rb" afterPath="$PROJECT_DIR$/app/helpers/main_helper.rb" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/views/layouts/_nav.html.erb" afterPath="$PROJECT_DIR$/app/views/layouts/_nav.html.erb" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/views/main/main.html.erb" afterPath="$PROJECT_DIR$/app/views/main/main.html.erb" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/public/stylesheets/mystyle.css" afterPath="$PROJECT_DIR$/public/stylesheets/mystyle.css" />
</list>
<ignored path="guoren.iws" />
<ignored path=".idea/workspace.xml" />
<ignored path="$PROJECT_DIR$/.bundle/" />
<ignored path="$PROJECT_DIR$/components/" />
<ignored path="$PROJECT_DIR$/public/system/" />
<ignored path="$PROJECT_DIR$/tmp/" />
<ignored path="$PROJECT_DIR$/vendor/bundle/" />
<ignored path=".idea/dataSources.local.xml" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="CoverageDataManager">
<SUITE FILE_PATH="coverage/guoren@Development__guoren.coverage" NAME="Development: guoren Coverage Results" MODIFIED="1482735933552" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="guoren" />
</component>
<component name="CreatePatchCommitExecutor">
<option name="PATCH_PATH" value="" />
</component>
<component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
<component name="FavoritesManager">
<favorites_list name="guoren" />
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="Gemfile" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/Gemfile">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="303">
<caret line="34" column="0" selection-start-line="34" selection-start-column="0" selection-end-line="34" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="main.html.erb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/views/main/main.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="629">
<caret line="91" column="16" selection-start-line="91" selection-start-column="16" selection-end-line="91" selection-end-column="16" />
<folding>
<element signature="n#div#0;n#div#0;n#div#0;n#div#0;n#!!top" expanded="false" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="action_view.rb" pinned="false" current-in-tab="false">
<entry file="file://$USER_HOME$/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/will_paginate-3.1.5/lib/will_paginate/view_helpers/action_view.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="425">
<caret line="25" column="8" selection-start-line="25" selection-start-column="8" selection-end-line="25" selection-end-column="8" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="view_helpers.rb" pinned="false" current-in-tab="false">
<entry file="file://$USER_HOME$/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/will_paginate-3.1.5/lib/will_paginate/view_helpers.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-241">
<caret line="76" column="95" selection-start-line="76" selection-start-column="87" selection-end-line="76" selection-end-column="95" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="micro_posts_helper.rb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/helpers/micro_posts_helper.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="408">
<caret line="24" column="0" selection-start-line="24" selection-start-column="0" selection-end-line="24" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="_nav.html.erb" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/app/views/layouts/_nav.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="374">
<caret line="37" column="17" selection-start-line="37" selection-start-column="17" selection-end-line="37" selection-end-column="17" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="main_controller.rb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/controllers/main_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="357">
<caret line="21" column="5" selection-start-line="21" selection-start-column="5" selection-end-line="21" selection-end-column="5" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="main_helper.rb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/helpers/main_helper.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="643">
<caret line="60" column="0" selection-start-line="60" selection-start-column="0" selection-end-line="60" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="instrumentation.rb" pinned="false" current-in-tab="false">
<entry file="file://$USER_HOME$/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actionpack-5.0.0.1/lib/action_controller/metal/instrumentation.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="322">
<caret line="45" column="0" selection-start-line="45" selection-start-column="0" selection-end-line="45" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="mystyle.css" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/public/stylesheets/mystyle.css">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="651">
<caret line="139" column="1" selection-start-line="139" selection-start-column="1" selection-end-line="139" selection-end-column="1" />
<folding />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/tmp/pids/server.pid" />
<option value="$PROJECT_DIR$/log/development.log" />
<option value="$PROJECT_DIR$/app/views/chat/index.html.erb" />
<option value="$PROJECT_DIR$/app/controllers/application_controller.rb" />
<option value="$PROJECT_DIR$/app/controllers/comments_controller.rb" />
<option value="$PROJECT_DIR$/app/controllers/users_controller.rb" />
<option value="$PROJECT_DIR$/app/helpers/chat_helper.rb" />
<option value="$PROJECT_DIR$/app/helpers/application_helper.rb" />
<option value="$PROJECT_DIR$/app/helpers/users_helper.rb" />
<option value="$PROJECT_DIR$/app/controllers/micro_posts_controller.rb" />
<option value="$PROJECT_DIR$/app/helpers/micro_posts_helper.rb" />
<option value="$PROJECT_DIR$/app/views/micro_posts/show.html.erb" />
<option value="$PROJECT_DIR$/public/stylesheets/style.css" />
<option value="$PROJECT_DIR$/.gitignore" />
<option value="$PROJECT_DIR$/高级软件工程TODOList.md" />
<option value="$PROJECT_DIR$/Gemfile" />
<option value="$PROJECT_DIR$/app/helpers/main_helper.rb" />
<option value="$USER_HOME$/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/will_paginate-3.1.5/lib/will_paginate/view_helpers.rb" />
<option value="$PROJECT_DIR$/public/stylesheets/mystyle.css" />
<option value="$PROJECT_DIR$/app/views/main/main.html.erb" />
<option value="$PROJECT_DIR$/app/controllers/main_controller.rb" />
<option value="$PROJECT_DIR$/app/views/layouts/_nav.html.erb" />
</list>
</option>
</component>
<component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsGulpfileManager">
<detection-done>true</detection-done>
<sorting>DEFINITION_ORDER</sorting>
</component>
<component name="LogFilters">
<option name="FILTER_ERRORS" value="false" />
<option name="FILTER_WARNINGS" value="false" />
<option name="FILTER_INFO" value="true" />
<option name="FILTER_DEBUG" value="true" />
<option name="CUSTOM_FILTER" />
</component>
<component name="ProjectFrameBounds">
<option name="y" value="23" />
<option name="width" value="1440" />
<option name="height" value="873" />
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
<OptionsSetting value="true" id="Add" />
<OptionsSetting value="true" id="Remove" />
<OptionsSetting value="true" id="Checkout" />
<OptionsSetting value="true" id="Update" />
<OptionsSetting value="true" id="Status" />
<OptionsSetting value="true" id="Edit" />
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
<component name="ProjectView">
<navigator currentView="ProjectPane" proportions="" version="1">
<flattenPackages />
<showMembers />
<showModules />
<showLibraryContents />
<hideEmptyPackages />
<abbreviatePackageNames />
<autoscrollToSource />
<autoscrollFromSource />
<sortByType />
<manualOrder />
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="Scope" />
<pane id="RailsProjectView" />
<pane id="ProjectPane">
<subPane>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="guoren" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="guoren" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="guoren" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="guoren" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="guoren" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="app" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="views" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="guoren" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="guoren" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="app" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="views" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="main" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="guoren" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="guoren" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="app" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="views" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="layouts" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="guoren" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="guoren" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="app" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="guoren" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="guoren" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="app" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="controllers" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
</subPane>
</pane>
<pane id="Scratches" />
</panes>
</component>
<component name="PropertiesComponent">
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="settings.editor.selected.configurable" value="reference.settingsdialog.IDE.editor.colors.Font" />
<property name="settings.editor.splitter.proportion" value="0.2" />
</component>
<component name="RunManager" selected="Rails.Development: guoren">
<configuration default="true" type="CucumberRunConfigurationType" factoryName="Cucumber">
<predefined_log_file id="RUBY_CUCUMBER" enabled="true" />
<module name="" />
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
<envs />
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
<COVERAGE_PATTERN ENABLED="true">
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
</COVERAGE_PATTERN>
</EXTENSION>
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*.feature" />
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_TAGS_FILTER" VALUE="" />
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_NAME_FILTER" VALUE="" />
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="CUCUMBER_ARGS" VALUE="--color -r features" />
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="VERBOSE_OPTION" VALUE="false" />
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="CUCUMBER_RUNNER_PATH" VALUE="" />
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_RUNNER" VALUE="false" />
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="SETTINGS_VERSION" VALUE="2" />
<method />
</configuration>
<configuration default="true" type="JavascriptDebugType" factoryName="JavaScript Debug">
<method />
</configuration>
<configuration default="true" type="RailsRunConfigurationType" factoryName="Rails">
<predefined_log_file id="RUBY_RAILS_SERVER" enabled="true" />
<module name="" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
<envs />
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
<COVERAGE_PATTERN ENABLED="true">
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
</COVERAGE_PATTERN>
</EXTENSION>
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SCRIPT_ARGS" VALUE="" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="PORT" VALUE="3000" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="IP" VALUE="0.0.0.0" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="DUMMY_APP" VALUE="test/dummy" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RAILS_SERVER_TYPE" VALUE="Default" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ENVIRONMENT_TYPE" VALUE="development" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="LAUNCH_JS" VALUE="false" />
<method />
</configuration>
<configuration default="true" type="RakeRunConfigurationType" factoryName="Rake">
<module name="" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
<envs />
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
<COVERAGE_PATTERN ENABLED="true">
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
</COVERAGE_PATTERN>
</EXTENSION>
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_NAME" VALUE="" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ARGS" VALUE="" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ATTACHED_TEST_FRAMEWORKS" VALUE="" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_TRACE" VALUE="false" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_DRYRUN" VALUE="false" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_PREREQS" VALUE="false" />
<method />
</configuration>
<configuration default="true" type="RubyRunConfigurationType" factoryName="Ruby">
<module name="" />
<RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
<RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="" />
<RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
<RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
<RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
<envs />
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
<COVERAGE_PATTERN ENABLED="true">
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
</COVERAGE_PATTERN>
</EXTENSION>
<RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="" />
<RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
<method />
</configuration>
<configuration default="true" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest">
<predefined_log_file id="RUBY_TESTUNIT" enabled="true" />
<module name="" />
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
<envs />
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
<COVERAGE_PATTERN ENABLED="true">
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
</COVERAGE_PATTERN>
</EXTENSION>
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="" />
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="" />
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_OPTIONS" VALUE="" />
<method />
</configuration>
<configuration default="true" type="js.build_tools.gulp" factoryName="Gulp.js">
<node-interpreter>project</node-interpreter>
<node-options />
<gulpfile />
<tasks />
<arguments />
<envs />
<method />
</configuration>
<configuration default="true" type="js.build_tools.npm" factoryName="npm">
<command value="run-script" />
<scripts />
<node-interpreter value="project" />
<envs />
<method />
</configuration>
<list size="4">
<item index="0" class="java.lang.String" itemvalue="Rake.test: guoren" />
<item index="1" class="java.lang.String" itemvalue="Rake.spec: guoren" />
<item index="2" class="java.lang.String" itemvalue="Rails.Production: guoren" />
<item index="3" class="java.lang.String" itemvalue="Rails.Development: guoren" />
</list>
</component>
<component name="ShelveChangesManager" show_recycled="false">
<option name="remove_strategy" value="false" />
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="585b6f0a-0d20-4a3c-825b-5f85848cbf40" name="Default" comment="" />
<created>1482659541785</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1482659541785</updated>
<workItem from="1482659543437" duration="1781000" />
<workItem from="1482662034465" duration="18070000" />
<workItem from="1482733701322" duration="75000" />
<workItem from="1482733804592" duration="3749000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="23675000" />
</component>
<component name="ToolWindowManager">
<frame x="0" y="23" width="1440" height="873" extended-state="6" />
<editor active="true" />
<layout>
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.20243205" sideWeight="0.49292928" order="0" side_tool="false" content_ui="combo" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.30111524" sideWeight="0.50858366" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3283767" sideWeight="0.49713877" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24964234" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.30111524" sideWeight="0.4914163" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.19670959" sideWeight="0.5070707" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.39900866" sideWeight="0.49570817" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3292683" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3283767" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
</layout>
</component>
<component name="UnknownFeatures">
<option featureType="com.intellij.fileTypeFactory" implementationName="*.gitignore" />
</component>
<component name="Vcs.Log.UiProperties">
<option name="RECENTLY_FILTERED_USER_GROUPS">
<collection />
</option>
<option name="RECENTLY_FILTERED_BRANCH_GROUPS">
<collection />
</option>
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
<breakpoints>
<line-breakpoint enabled="true" type="ruby-line">
<url>file://$PROJECT_DIR$/app/controllers/micro_posts_controller.rb</url>
<line>21</line>
<option name="timeStamp" value="5" />
</line-breakpoint>
</breakpoints>
<option name="time" value="8" />
</breakpoint-manager>
<watches-manager>
<configuration name="RailsRunConfigurationType">
<watch expression="pictures.original_filename" language="ruby" />
<watch expression="!page_num" language="ruby" />
<watch expression="pic.original_filename" language="ruby" />
<watch expression="save_name" language="ruby" />
<watch expression="page_num" language="ruby" />
</configuration>
</watches-manager>
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/app/views/micro_posts/show.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1173">
<caret line="69" column="15" selection-start-line="69" selection-start-column="15" selection-end-line="69" selection-end-column="15" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/public/stylesheets/style.css">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="32266">
<caret line="1898" column="0" selection-start-line="1898" selection-start-column="0" selection-end-line="1898" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/.gitignore">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1071">
<caret line="63" column="0" selection-start-line="63" selection-start-column="0" selection-end-line="63" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/main/main.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="3604">
<caret line="212" column="54" selection-start-line="212" selection-start-column="54" selection-end-line="212" selection-end-column="54" />
<folding>
<element signature="n#div#0;n#div#0;n#div#0;n#div#0;n#!!top" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/helpers/micro_posts_helper.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="204">
<caret line="12" column="41" selection-start-line="12" selection-start-column="41" selection-end-line="12" selection-end-column="41" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/public/stylesheets/mystyle.css">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1258">
<caret line="74" column="22" selection-start-line="74" selection-start-column="22" selection-end-line="74" selection-end-column="22" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/micro_posts/show.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1173">
<caret line="69" column="15" selection-start-line="69" selection-start-column="15" selection-end-line="69" selection-end-column="15" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/public/stylesheets/style.css">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="32266">
<caret line="1898" column="0" selection-start-line="1898" selection-start-column="0" selection-end-line="1898" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/.gitignore">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/main/main.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="3604">
<caret line="212" column="54" selection-start-line="212" selection-start-column="54" selection-end-line="212" selection-end-column="54" />
<folding>
<element signature="n#div#0;n#div#0;n#div#0;n#div#0;n#!!top" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/helpers/micro_posts_helper.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="204">
<caret line="12" column="41" selection-start-line="12" selection-start-column="41" selection-end-line="12" selection-end-column="41" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/public/stylesheets/mystyle.css">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1258">
<caret line="74" column="22" selection-start-line="74" selection-start-column="22" selection-end-line="74" selection-end-column="22" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Gemfile">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="420">
<caret line="28" column="0" selection-start-line="28" selection-start-column="0" selection-end-line="28" selection-end-column="51" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/log/development.log" />
<entry file="file://$PROJECT_DIR$/.gitignore">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tmp/pids/server.pid" />
<entry file="file://$PROJECT_DIR$/log/development.log" />
<entry file="file://$PROJECT_DIR$/app/views/chat/index.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="3536">
<caret line="235" column="35" selection-start-line="235" selection-start-column="35" selection-end-line="235" selection-end-column="35" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/config/routes.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="357">
<caret line="21" column="15" selection-start-line="21" selection-start-column="8" selection-end-line="21" selection-end-column="15" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/models/micro_post.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/helpers/login_helper.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/users_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="102">
<caret line="6" column="30" selection-start-line="6" selection-start-column="30" selection-end-line="6" selection-end-column="30" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/helpers/application_helper.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="34">
<caret line="2" column="26" selection-start-line="2" selection-start-column="26" selection-end-line="2" selection-end-column="26" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/helpers/chat_helper.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="442">
<caret line="56" column="11" selection-start-line="56" selection-start-column="11" selection-end-line="56" selection-end-column="11" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/application_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="85">
<caret line="5" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="15" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/chat_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="187">
<caret line="11" column="30" selection-start-line="0" selection-start-column="0" selection-end-line="95" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/comments_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="204">
<caret line="12" column="24" selection-start-line="0" selection-start-column="0" selection-end-line="23" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/login_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="221">
<caret line="13" column="18" selection-start-line="0" selection-start-column="0" selection-end-line="27" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/models/user.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/helpers/users_helper.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="34">
<caret line="2" column="0" selection-start-line="2" selection-start-column="0" selection-end-line="2" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/public/data/e07e5193c08ec8095be0ca7f97ab044c.png" />
<entry file="file://$PROJECT_DIR$/public/data/0feb2b9e089920216b1449b3047f6075.jpg">
<provider selected="true" editor-type-id="images">
<state />
</provider>
</entry>
<entry file="file://$USER_HOME$/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actionpack-5.0.0.1/lib/action_controller/metal/rescue.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="374">
<caret line="22" column="0" selection-start-line="22" selection-start-column="0" selection-end-line="22" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0.1/lib/active_support/notifications/instrumenter.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="374">
<caret line="22" column="0" selection-start-line="22" selection-start-column="0" selection-end-line="22" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/micro_posts_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="204">
<caret line="12" column="0" selection-start-line="12" selection-start-column="0" selection-end-line="12" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="152">
<caret line="126" column="0" selection-start-line="126" selection-start-column="0" selection-end-line="126" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/public/stylesheets/style.css">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="32266">
<caret line="1898" column="0" selection-start-line="1898" selection-start-column="0" selection-end-line="1898" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/micro_posts/show.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1173">
<caret line="69" column="15" selection-start-line="69" selection-start-column="15" selection-end-line="69" selection-end-column="15" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/.gitignore">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="43">
<caret line="38" column="27" selection-start-line="38" selection-start-column="27" selection-end-line="38" selection-end-column="27" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/高级软件工程TODOList.md">
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="SPLIT">
<first_editor relative-caret-position="17">
<caret line="1" column="24" selection-start-line="1" selection-start-column="24" selection-end-line="1" selection-end-column="24" />
<folding />
</first_editor>
<second_editor />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actionpack-5.0.0.1/lib/action_controller/metal/basic_implicit_render.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="51">
<caret line="3" column="0" selection-start-line="3" selection-start-column="0" selection-end-line="3" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actionpack-5.0.0.1/lib/action_controller/metal/instrumentation.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="322">
<caret line="45" column="0" selection-start-line="45" selection-start-column="0" selection-end-line="45" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/will_paginate-3.1.5/lib/will_paginate/view_helpers/action_view.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="425">
<caret line="25" column="8" selection-start-line="25" selection-start-column="8" selection-end-line="25" selection-end-column="8" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/helpers/main_helper.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="643">
<caret line="60" column="0" selection-start-line="60" selection-start-column="0" selection-end-line="60" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/public/stylesheets/mystyle.css">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="651">
<caret line="139" column="1" selection-start-line="139" selection-start-column="1" selection-end-line="139" selection-end-column="1" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Gemfile">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="303">
<caret line="34" column="0" selection-start-line="34" selection-start-column="0" selection-end-line="34" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/will_paginate-3.1.5/lib/will_paginate/view_helpers.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-241">
<caret line="76" column="95" selection-start-line="76" selection-start-column="87" selection-end-line="76" selection-end-column="95" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/helpers/micro_posts_helper.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="408">
<caret line="24" column="0" selection-start-line="24" selection-start-column="0" selection-end-line="24" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/main_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="357">
<caret line="21" column="5" selection-start-line="21" selection-start-column="5" selection-end-line="21" selection-end-column="5" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/main/main.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="629">
<caret line="91" column="16" selection-start-line="91" selection-start-column="16" selection-end-line="91" selection-end-column="16" />
<folding>
<element signature="n#div#0;n#div#0;n#div#0;n#div#0;n#!!top" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/layouts/_nav.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="374">
<caret line="37" column="17" selection-start-line="37" selection-start-column="17" selection-end-line="37" selection-end-column="17" />
<folding />
</state>
</provider>
</entry>
</component>
</project>

View File

@ -25,10 +25,9 @@ gem 'jbuilder', '~> 2.5'
# gem 'redis', '~> 3.0'
# Use ActiveModel has_secure_password
gem 'bcrypt', '~> 3.1.7'
# for windows
gem 'bcrypt-ruby', '~> 3.0.0', :require => "bcrypt"
# will_paginate
gem 'will_paginate', '~> 3.1.0'
gem 'sendgrid-ruby'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
@ -48,9 +47,9 @@ group :development do
gem 'spring-watcher-listen', '~> 2.0.0'
end
# group :production do
# gem 'pg','~> 0.18.4'
# end
group :production do
gem 'pg'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

View File

@ -41,7 +41,6 @@ GEM
arel (7.1.4)
bcrypt (3.1.11)
bcrypt (3.1.11-x64-mingw32)
bcrypt-ruby (3.0.1)
builder (3.2.2)
byebug (9.0.6)
coffee-rails (4.2.1)
@ -86,6 +85,8 @@ GEM
mini_portile2 (~> 2.1.0)
nokogiri (1.6.8.1-x64-mingw32)
mini_portile2 (~> 2.1.0)
pg (0.19.0)
pg (0.19.0-x64-mingw32)
puma (3.6.2)
rack (2.0.1)
rack-test (0.6.3)
@ -117,6 +118,7 @@ GEM
rb-fsevent (0.9.8)
rb-inotify (0.9.7)
ffi (>= 0.5.0)
ruby_http_client (3.0.0)
sass (3.4.22)
sass-rails (5.0.6)
railties (>= 4.0.0, < 6)
@ -124,6 +126,8 @@ GEM
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
sendgrid-ruby (4.0.6)
ruby_http_client (~> 3.0.0)
spring (2.0.0)
activesupport (>= 4.2)
spring-watcher-listen (2.0.1)
@ -166,16 +170,17 @@ PLATFORMS
DEPENDENCIES
bcrypt (~> 3.1.7)
bcrypt-ruby (~> 3.0.0)
byebug
coffee-rails (~> 4.2)
jbuilder (~> 2.5)
jquery-rails
listen (~> 3.0.5)
pg
puma (~> 3.0)
rails (~> 5.0.0, >= 5.0.0.1)
rake
sass-rails (~> 5.0)
sendgrid-ruby
spring
spring-watcher-listen (~> 2.0.0)
sqlite3

View File

@ -3,6 +3,7 @@ class ApplicationController < ActionController::Base
include ApplicationHelper
include LoginHelper
include UsersHelper
# Confirms a logged-in user.

View File

@ -31,9 +31,9 @@ class ChatController < ApplicationController
create_time: save_time, readed: false)
if msg_db.save
render json: {username: username, userpic: userpic, content: msg, time: save_time}
render json: {username: username, userpic: userpic, content: msg, time: get_strftime(save_time)}
else
render json: {username: username, userpic: userpic, content: "error", time: save_time}
render json: {username: username, userpic: userpic, content: "error", time: get_strftime(save_time)}
end
end
@ -67,11 +67,16 @@ class ChatController < ApplicationController
if query_user.nil?
query_name = nil
ok = false
else
if query_name == @user.name
query_name = nil
ok = false
else
query_name = query_user.name
query_pic = query_user.picurl
ok = true
end
end
else
if all_user_names.include? query_name or query_name == @user.name
query_name = nil

View File

@ -12,7 +12,7 @@ class MainController < ApplicationController
page_num = 1
end
if !post_type
post_type=[1,2,3]
post_type=[1, 2, 3]
end
@posts = MicroPost.where(post_type: post_type).paginate(:page => page_num, :per_page => 10).order(post_time: :desc)
@ -22,18 +22,17 @@ class MainController < ApplicationController
end
def activity
@user = current_user
micro_post_id = params[:micropost_id]
join = params[:join].to_s
micro_post = MicroPost.find_by(id: micro_post_id)
if join == "true"
micro_post.engage_people += 1
num, names = new_engaged_people(micro_post_id, current_user.name)
else
micro_post.engage_people -= 1
end
if micro_post.save
render json: {total_num: micro_post.engage_people}
num, names = delete_engaged_people(micro_post_id, current_user.name)
end
render json: {total_num: num, total_names: names}
end
end

View File

@ -27,10 +27,23 @@ class MicroPostsController < ApplicationController
if post_type >= 1 and post_type <= 3 and !title.empty? and !content.empty?
micropost = @user.micro_posts.new(title: title, content: content, pic: pic_path,
post_time: DateTime.now, post_type: post_type, engage_people: 0)
post_time: DateTime.now, post_type: post_type,
engage_people: 1, engaged_people_names: current_user.name)
micropost.save
end
redirect_to microposts_path
end
def delete
@user = current_user
micropost_id = params[:micropost_id].to_i
micropost_id = @user.micro_posts.find_by(id: micropost_id)
if micropost_id
micropost_id.destroy
render json: {status:true}
else
render json: {status:false}
end
end
end

View File

@ -1,4 +1,8 @@
class UsersController < ApplicationController
before_action :logged_in_user,except: [:new,:create,:forgetpasswd,:changepasswd]
@@user_pics_dir = "public/userpics"
def new
@user = User.new
end
@ -20,14 +24,65 @@ class UsersController < ApplicationController
def update
if @user.update_attributes(user_params)
flash[:success]="profile updated"
redirect_to @user
end
def forgetpasswd
useremail = params[:email]
if useremail
@user = User.find_by(email: useremail)
if !@user.nil?
send_code @user
flash[:success] = "验证码已发送至您的邮箱"
redirect_to changepasswd_path(email: @user.email)
else
render 'edit'
flash[:danger] = "用户不存在"
render 'forgetpasswd'
end
else
render 'forgetpasswd'
end
end
def changepasswd
if request.get?
user_email = params[:email]
if user_email
@user = User.find_by(email: user_email)
if !@user.nil?
render 'changepasswd'
else
flash[:danger] = "用户不存在"
redirect_to login_path
end
else
redirect_to login_path
end
else
result = check_change_params(params[:email], params[:verify_code], params[:password], params[:password_confirm])
if result
flash[:success]="密码更新成功"
else
flash[:danger]="密码更新失败"
end
redirect_to login_path
end
end
def changeprofile
@user = current_user
result, user, err_string = check_change_profile_params(params[:user])
if result == false
flash[:danger] = err_string
else
pic_url = save_user_pic params[:user][:pic]
if pic_url.nil? == false
user[:picurl] = pic_url
end
@user.update_attributes(user)
end
redirect_to profile_path
end
private
@ -36,4 +91,58 @@ class UsersController < ApplicationController
:password_confirmation)
end
def check_change_profile_params user_params
if user_params.nil?
return false, nil, "修改参数为空"
end
if user_params[:username].length <= 0
return false, nil, "姓名错误"
end
user = Hash.new
user[:name] = user_params[:username]
user[:profession] = user_params[:profession]
user[:sexual] = user_params[:sexual]
return true, user, nil
end
def save_user_pic pic
if pic.nil?
return nil
end
if !(File.directory? @@user_pics_dir)
FileUtils.mkdir_p(@@user_pics_dir)
end
ext = File.extname(pic.original_filename)
timestamp = Time.now.to_s
picname = Digest::MD5::hexdigest(pic.original_filename + timestamp) + ext
File.open(File.join(@@user_pics_dir, picname), 'wb') { |f| f.write(pic.read) }
save_name = File.join("userpics", picname)
return save_name
end
def send_code user
verify_code = rand(999999).to_s
result = UserMailer.send_verify_code(user.email, verify_code).deliver_now
p result
user.update_attribute(:verify_code, verify_code)
end
def check_change_params(email, verify_code, password, password_confirmation)
if password != password_confirmation
return false
end
user = User.find_by(email: email)
if user.nil?
return false
end
if user.verify_code != verify_code
return false
end
hold = Hash.new
hold[:password] = password
hold[:password_confirmation] = password_confirmation
user.update_attributes(hold)
return true
end
end

View File

@ -1,8 +1,9 @@
module ApplicationHelper
def utc_time_to_local utctime
def get_strftime intime
# 将数据库中的UTC时间转换为本地时间
return utctime.localtime.strftime(format='%F %T')
return intime.utc.in_time_zone('Beijing').strftime(format='%F %T')
end
end

View File

@ -43,12 +43,12 @@ module ChatHelper
messages.each do |message|
if message.send_user == user.id
x = {issend: true, name: user.name, userpic: user.picurl,
content: message.content, time: utc_time_to_local(message.create_time)}
content: message.content, time: get_strftime(message.create_time)}
else
message.readed = true
message.save
x = {issend: false, name: chat_with.name, userpic: chat_with.picurl,
content: message.content, time: utc_time_to_local(message.create_time)}
content: message.content, time: get_strftime(message.create_time)}
end
results << x
end

View File

@ -1,35 +1,5 @@
module MainHelper
def read_newest_post offset_num
micro_posts_array = []
micro_posts = MicroPost.all.order(post_time: :desc).limit(20).offset(offset_num)
if !micro_posts.empty?
micro_posts.each do |micro_post|
x = Hash.new()
x["username"] = micro_post.user.name
x["userpic"] = micro_post.user.picurl
x["postid"] = micro_post.id
x["title"] = micro_post.title
x["content"] = micro_post.content
case micro_post.post_type
when 1
x["type"] = "新鲜事"
when 2
x["type"] = "组团信息"
when 3
x["type"] = "失物招领"
else
x["type"] = "新鲜事"
end
x["time"] = utc_time_to_local(micro_post.post_time)
x["pics"] = micro_post.pic.split(',') if micro_post.pic
x["peo_num"] = micro_post.engage_people
micro_posts_array << x
end
end
return micro_posts_array
end
def get_post posts
micro_posts_array = []
if !posts.empty?
@ -50,7 +20,7 @@ module MainHelper
else
x["type"] = "新鲜事"
end
x["time"] = utc_time_to_local(micro_post.post_time)
x["time"] = get_strftime(micro_post.post_time)
x["pics"] = micro_post.pic.split(',') if micro_post.pic
x["peo_num"] = micro_post.engage_people
micro_posts_array << x
@ -59,4 +29,69 @@ module MainHelper
return micro_posts_array
end
end
def get_engaged_people micropost_id
# 获得参加活动的人数和姓名
MicroPost.transaction do
micropost = MicroPost.lock.find_by(id: micropost_id)
engage_people = micropost.engage_people
engage_people_name = micropost.engaged_people_names
return engage_people, engage_people_name
end
end
def save_engaged_people(micropost_id, num, names)
# 将参加活动的人数和姓名存入数据库中
MicroPost.transaction do
micropost = MicroPost.lock.find_by(id: micropost_id)
micropost.engage_people = num
micropost.engaged_people_names = names
micropost.save
end
end
def new_engaged_people(micropost_id, name)
# 新参加活动登记
engage_people, engage_people_names = get_engaged_people micropost_id
if engage_people_names.nil?
engage_people += 1
engage_people_names = name
else
engage_people_names = engage_people_names.split(',')
if engage_people_names.include?(name) != true
engage_people_names << name
engage_people += 1
end
engage_people_names = engage_people_names.join(',')
end
save_engaged_people(micropost_id, engage_people, engage_people_names)
return engage_people, engage_people_names
end
def delete_engaged_people(micropost_id, name)
# 退出活动登记
engage_people, engage_people_names = get_engaged_people micropost_id
engage_people_names = engage_people_names.split(',')
if engage_people_names.delete(name)
engage_people_names = engage_people_names.join(',')
engage_people -= 1
save_engaged_people(micropost_id, engage_people, engage_people_names)
end
return engage_people,engage_people_names
end
def joinded_activity(micropost_id,name)
engage_people, engage_people_names = get_engaged_people micropost_id
if engage_people_names.nil?
return false
end
engage_people_names = engage_people_names.split(',')
return engage_people_names.include?(name)
end
def micro_post_belong_to_user(micropost_id,user)
find_result = user.micro_posts.where(id: micropost_id)
return !find_result.empty?
end
end

View File

@ -9,6 +9,7 @@ module MicroPostsHelper
if !micro_posts.empty?
micro_posts.each do |micro_post|
x = Hash.new()
x["postid"] = micro_post.id
x["title"] = micro_post.title
x["content"] = micro_post.content
case micro_post.post_type
@ -21,9 +22,11 @@ module MicroPostsHelper
else
x["type"] = "新鲜事"
end
x["time"] = utc_time_to_local(micro_post.post_time)
x["time"] = get_strftime(micro_post.post_time)
x["pics"] = micro_post.pic.split(',') if micro_post.pic
x["peo_num"] = micro_post.engage_people
x["peo_names"] = micro_post.engaged_people_names
x["comments"] = micro_post.comments
micro_posts_array << x
end
end
@ -35,7 +38,8 @@ module MicroPostsHelper
FileUtils.mkdir_p(@@micro_posts_dir)
end
ext = File.extname(pic.original_filename)
save_name = Digest::MD5::hexdigest(pic.original_filename) + ext
timestamp = Time.now.to_s
save_name = Digest::MD5::hexdigest(pic.original_filename + timestamp) + ext
File.open(File.join(@@micro_posts_dir, save_name), 'wb') { |f| f.write(pic.read) }
return save_name
end

View File

@ -1,2 +1,11 @@
module UsersHelper
def get_user_name_from_id user_id
user = User.find_by(id: user_id)
return user.name if !user.nil?
end
def get_user_sexual user
user.sexual
end
end

View File

@ -1,4 +1,4 @@
class ApplicationMailer < ActionMailer::Base
default from: 'from@example.com'
default from: "ucasguoren@heroku.com"
layout 'mailer'
end

View File

@ -0,0 +1,9 @@
class UserMailer < ApplicationMailer
default from: "ucasguoren@heroku.com"
def send_verify_code mail_address, code
@verify_code = code
mail(to: mail_address, subject: "验证码")
end
end

View File

@ -1,4 +1,4 @@
class MicroPost < ApplicationRecord
belongs_to :user, dependent: :destroy
belongs_to :user
has_many :comments, class_name: 'Comment', foreign_key: 'micro_post_id', dependent: :destroy
end

View File

@ -2,11 +2,13 @@ class User < ApplicationRecord
before_save :default_values
def default_values
if self.picurl.nil?
self.picurl = 'images/avatars/default/avatar.png'
end
end
has_many :send_messages, class_name: 'Message', foreign_key: 'send_user'
has_many :recieve_messages, class_name: 'Message', foreign_key: 'recieve_user'
has_many :send_messages, class_name: 'Message', foreign_key: 'send_user', dependent: :destroy
has_many :recieve_messages, class_name: 'Message', foreign_key: 'recieve_user', dependent: :destroy
has_many :micro_posts, dependent: :destroy
has_many :comments, class_name: 'Comment', foreign_key: 'user_id', dependent: :destroy
@ -22,4 +24,6 @@ class User < ApplicationRecord
has_secure_password
validates :password, presence: true, length: {minimum: 6}, allow_nil: true
end

View File

@ -8,8 +8,8 @@
<%= form_tag(controller: "login", action: "login", method: "post") do %>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon"><i class="icon-envelope"></i></span><input class="form-control"
placeholder="请输入登陆账号"
<span class="input-group-addon"><i class="icon-user"></i></span><input class="form-control"
placeholder="请输入登陆邮箱"
name="email"
type="text">
</div>
@ -22,10 +22,10 @@
type="password">
</div>
</div>
<a class="pull-right" href="#">忘记密码?</a>
<div class="text-left">
<label class="checkbox"><input type="checkbox" name="remember" ><span>记住我</span></label>
</div>
<a class="pull-right" href="/forgetpasswd">忘记密码?</a>
<!--<div class="text-left">-->
<!--<label class="checkbox"><input type="checkbox" name="remember"><span>记住我</span></label>-->
<!--</div>-->
<input class="btn btn-lg btn-primary btn-block" type="submit" value="登陆">
<% end %>
<p>

View File

@ -5,7 +5,7 @@
<div class="container-fluid main-content">
<%= render 'layouts/nav' %>
<div class="row">
<div class="col-lg-8">
<div class="col-lg-12">
<% @micro_posts_array.each do |micro_post| %>
<div class="social-wrapper">
<div class="social-container">
@ -32,12 +32,16 @@
</div>
<% end %>
</div>
<% if micro_post_belong_to_user(micro_post["postid"], @user) == false %>
<% if micro_post["type"] == "组团信息" %>
<div class="social-button">
<button class="btn btn-lg btn-success-outline activity">报名参加
</button>
<div class="activity-detail text-center">
</div>
<% if joinded_activity(micro_post["postid"], @user.name) %>
<button class="btn btn-lg btn-success-outline activity">取消报名</button>
<div class="activity-detail text-center"></div>
<% else %>
<button class="btn btn-lg btn-success-outline activity">报名参加</button>
<div class="activity-detail text-center"></div>
<% end %>
</div>
<% end %>
<% if micro_post["type"] == "失物招领" %>
@ -46,6 +50,7 @@
</button>
</div>
<% end %>
<% end %>
</div>
<div class="comment-button">
<button class="btn btn-block btn-default-outline showcomment">
@ -171,7 +176,7 @@
success: function (data, textStatus, jqXHR) {
//console.log(data["total_num"]);
var engage_people = data["total_num"];
var show_text = "已有" + engage_people + "人参加该活动";
var show_text = "已有" + engage_people + "人参加该活动" + '\n' + data["total_names"] + "参加了活动";
activity.text("取消报名");
micropost.find(".activity-detail").text(show_text);
}
@ -185,7 +190,7 @@
url: '/activity',
success: function (data, textStatus, jqXHR) {
activity.text("报名参加");
micropost.find(".activity-detail").text("");
micropost.find(".activity-detail").text("成功取消报名");
}
});
}

View File

@ -8,7 +8,7 @@
<!-- End Navigation -->
<div class="container-fluid main-content padded" id="user-page">
<row id="new-post">
<div class="row" id="new-post">
<div class="widget-container fluid-height clearfix">
<div class="heading">
<i class="icon-reorder"></i>发布新信息
@ -56,12 +56,12 @@
</div>
<% end %>
</div>
</row>
</div>
<div class="posts">
<% @micro_posts.each do |micro_post| %>
<div class="micro-post">
<button class="close" data-dismiss="alert" type="button">×</button>
<div class="micro-post" id="<%= micro_post["postid"] %>">
<button class="close delete-post" data-dismiss="alert" type="button">×</button>
<div class="widget-container fluid-height padded">
<div class="heading col-md-12">
<i class="icon-tags"><%= micro_post["type"] %></i>
@ -77,13 +77,48 @@
</div>
<% end %>
</div>
<div class="col-md-12">
<div class="btn btn-default btn-block">
<div class="btn btn-default btn-block show-details">
查看详情
</div>
</div>
</div>
<div class="activity-details" hidden>
<% if micro_post["type"] == "组团信息" %>
<div class="widget-container fluid-height">
<div class="heading">
<i class="icon-align-center"> 活动详情 </i>
</div>
<div class="widget-content padded">
<h3 class="text-center">已有<%= micro_post["peo_num"] %>人参加活动</h3>
<p><%= micro_post["peo_names"] %>参加了该活动</p>
</div>
</div>
<% end %>
<% if !micro_post["comments"].empty? %>
<div class="widget-container fluid-height scrollable list user-comments">
<div class="heading">
<i class="icon-mail-forward"> 评论 </i>
</div>
<div class="widget-content fluid-height">
<ul>
<% micro_post["comments"].each do |comment| %>
<li>
<div>
<a class="user-name"><%= get_user_name_from_id(comment.user_id) %></a><em></em>
</div>
<div>
<p><%= comment.content %></p>
</div>
</li>
<% end %>
</ul>
</div>
</div>
<% else %>
<p class="text-center alert-info">暂无评论</p>
<% end %>
</div>
</div>
<% end %>
</div>
@ -186,4 +221,41 @@
function G(id) {
return document.getElementById(id);
}
$(".delete-post").bind("click", function () {
var errorhtml = '<div class="alert alert-danger">' +
'<button class="close" data-dismiss="alert" type="button">×</button>删除失败</div>';
var successhtml = '<div class="alert alert-success">' +
'<button class="close" data-dismiss="alert" type="button">×</button>删除成功</div>';
var micropost_id = $(this).parent().attr("id");
$.ajax({
type: 'get',
dataType: 'json',
data: {micropost_id: micropost_id},
url: '/deletepost',
success: function (data, textStatus, jqXHR) {
if (data['status'] == true) {
$('.posts').before(successhtml);
}
else {
$('.posts').before(errorhtml);
}
}
});
});
$('.show-details').bind("click", function () {
var current_button = $(this);
var micropost = current_button.parent().parent().parent();
var text = current_button.text().trim();
if (text == "查看详情") {
micropost.find(".activity-details").show();
current_button.text("隐藏详情");
}
else {
micropost.find(".activity-details").hide();
current_button.text("查看详情");
}
})
</script>

View File

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!-- 新 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap.min.css">
<!-- 可选的Bootstrap主题文件一般不用引入 -->
<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap-theme.min.css">
<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
<script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script>
<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="http://cdn.bootcss.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
您的验证码是: <%= @verify_code %>
</div>
</body>
</html>

View File

@ -0,0 +1,47 @@
<% provide(:title, '忘记密码') %>
<% provide(:body_class, 'login2') %>
<div class="login-wrapper">
<a href="#"><img width="210" height="70" src="images/logo/guoren.png"/></a>
<%= form_tag("/changepasswd", method: "post") do %>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon"><i class="icon-envelope"></i></span><input class="form-control"
placeholder="请输入邮箱地址"
name="email"
type="email">
</div>
</div>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon"><i class="icon-lock"></i></span><input class="form-control"
placeholder="请输入邮箱验证码"
name="verify_code"
type="number">
</div>
</div>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon"><i class="icon-ok"></i></span><input class="form-control"
placeholder="请输入新密码"
name="password"
type="password">
</div>
</div>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon"><i class="icon-ok"></i></span><input class="form-control"
placeholder="请再次输入新密码"
name="password_confirm"
type="password">
</div>
</div>
<%= submit_tag "重置密码", class: "btn btn-primary btn-block" %>
<% end %>
</div>

View File

@ -2,11 +2,12 @@
<div class="modal-shiftfix">
<div id="profile-container" class="container-fluid main-content">
<div id="profile-container" class="container-fluid main-content">
<%= render 'layouts/nav' %>
<form action="/baidu" class="form-horizontal" id="profile" method="post">
<%= form_tag("/changeprofile", method: "post", class: "form-horizontal", id: "profile", enctype: "multipart/form-data") do %>
<div class="row">
<div class="widget-container">
<div class="heading">
@ -23,7 +24,7 @@
<div class="fileupload fileupload-new" data-provides="fileupload">
<div class="fileupload-new img-thumbnail" style="width: 200px; height: 200px;">
<!--原照片-->
<img src="/images/avatars/default/avatar.png">
<img src="<%= @user.picurl %>">
</div>
<div class="fileupload-preview fileupload-exists img-thumbnail"
style="width: 200px; max-height: 200px">
@ -37,12 +38,9 @@
class="fileupload-exists">
重新选择
</span>
<input type="file" name="image_file">
<input type="file" name="user[pic]">
</span>
<a
class="btn btn-default fileupload-exists" data-dismiss="fileupload"
href="#">清除照片
</a>
<a class="btn btn-default fileupload-exists" data-dismiss="fileupload">清除照片</a>
</div>
</div>
</div>
@ -57,52 +55,43 @@
<div class="form-group">
<label class="control-label col-md-2">姓名</label>
<div class="col-md-9">
<input class="form-control" placeholder="Text" type="text">
<input class="form-control" placeholder="请输入您的姓名" value="<%= @user.name %>"
type="text" name="user[username]">
</div>
</div>
<div class="form-group">
<label class="control-label col-md-2">专业</label>
<div class="col-md-9">
<input class="form-control" placeholder="Text" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-md-2">学院</label>
<div class="col-md-9">
<select class="form-control">
<option value="Category 1">Option 1</option>
<option value="Category 2">Option 2</option>
<option value="Category 3">Option 3</option>
<option value="Category 4">Option 4</option>
</select>
<input class="form-control" placeholder="请输入您的专业" value="<%= @user.profession %>"
type="text" name="user[profession]">
</div>
</div>
<div class="form-group">
<label class="control-label col-md-2">性别</label>
<div class="col-md-9">
<label class="radio-inline"><input name="optionsRadios" type="radio"
value="1"><span>男</span></label><label
class="radio-inline"><input name="optionsRadios"
type="radio"
value="0"><span>女</span></label>
<label class="radio-inline"><input name="user[sexual]" type="radio" value="1"
<% if get_user_sexual(@user) == true %>checked
<% end %>
><span>男</span></label>
<label class="radio-inline"><input name="user[sexual]" type="radio" value="0"
<% if get_user_sexual(@user) == false %>checked
<% end %>
><span>女</span></label>
</div>
</div>
<div class="form-group">
<div class="col-md-12 text-center">
<button class="btn btn-primary" type="submit">修改</button>
<button class="btn btn-default-outline">取消</button>
</div>
</div>
</div>
</div>
</div>
<% end %>
</form>
</div>
</div>
</div>

View File

@ -0,0 +1,22 @@
<% provide(:title, '忘记密码') %>
<% provide(:body_class, 'login2') %>
<div class="login-wrapper">
<a href="#"><img width="210" height="70" src="images/logo/guoren.png"/></a>
<%= form_tag("/forgetpasswd", method: "get") do %>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon"><i class="icon-envelope"></i></span><input class="form-control"
placeholder="请输入邮箱地址"
name="email"
type="email">
</div>
</div>
<%= submit_tag "找回密码", class: "btn btn-primary btn-block" %>
<% end %>
</div>

33
code.bak Normal file
View File

@ -0,0 +1,33 @@
<%= form_for @user, url: {action: "changepasswd"} do |f| %>
<%= render 'shared/error_messages', object: f.object %>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon"><i class="icon-lock"></i></span>
<input class="form-control" placeholder="请输入邮箱验证码" name="verify_code" type="text">
</div>
</div>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon"><i class="icon-envelope"></i></span>
<%= f.email_field :email, class: 'form-control', placeholder: "请输入邮箱" %>
</div>
</div>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon"><i class="icon-ok"></i></span>
<%= f.password_field :password, class: 'form-control', placeholder: "请输入密码" %>
</div>
</div>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon"><i class="icon-ok"></i></span>
<%= f.password_field :password_confirmation, class: 'form-control', placeholder: "请再次输入密码" %>
</div>
</div>
<%= f.submit "重置密码", class: "btn btn-primary btn-block" %>
<% end %>

View File

@ -11,5 +11,6 @@ module GuorenPro
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
config.time_zone = 'Beijing'
end
end

View File

@ -51,4 +51,19 @@ Rails.application.configure do
# Use an evented file watcher to asynchronously detect changes in source code,
# routes, locales, etc. This feature depends on the listen gem.
config.file_watcher = ActiveSupport::EventedFileUpdateChecker
config.action_mailer.raise_delivery_errors = true
config.action_mailer.delivery_method = :smtp
host = 'ucasguoren.herokuapp.com'
config.action_mailer.default_url_options = {host: host}
config.action_mailer.raise_delivery_errors = true
config.action_mailer.smtp_settings = {
:address => "smtp.sendgrid.net",
:port => 587,
:user_name => "app61271187@heroku.com",
:password => "5cysx5kw9899",
:authentication => "plain",
:domain => 'herokuapp.com',
:enable_starttls_auto => true
}
end

View File

@ -83,4 +83,19 @@ Rails.application.configure do
# Do not dump schema after migrations.
config.active_record.dump_schema_after_migration = false
config.action_mailer.raise_delivery_errors = true
config.action_mailer.delivery_method = :smtp
host = 'ucasguoren.herokuapp.com'
config.action_mailer.default_url_options = {host: host}
config.action_mailer.raise_delivery_errors = true
config.action_mailer.smtp_settings = {
:address => "smtp.sendgrid.net",
:port => 587,
:user_name => ENV['SENDGRID_USERNAME'],
:password => ENV['SENDGRID_PASSWORD'],
:authentication => "plain",
:domain => 'herokuapp.com',
:enable_starttls_auto => true
}
end

View File

@ -7,10 +7,14 @@ Rails.application.routes.draw do
get 'logout', to: 'login#logout'
get '/signup', to: 'users#new'
get '/profile' ,to: 'users#edit'
get '/profile', to: 'users#edit'
get '/forgetpasswd', to: 'users#forgetpasswd'
get '/changepasswd', to: 'users#changepasswd'
post '/changepasswd', to: 'users#changepasswd'
post '/changeprofile', to: 'users#changeprofile'
get '/main', to: 'main#show'
get '/activity',to: 'main#activity'
get '/activity', to: 'main#activity'
get '/chat', to: 'chat#index'
post '/newmsg', to: 'chat#new'
@ -19,7 +23,9 @@ Rails.application.routes.draw do
get '/online', to: 'chat#online'
get '/microposts', to: 'micro_posts#show'
post 'newpost', to: 'micro_posts#new'
post '/newpost', to: 'micro_posts#new'
get '/deletepost', to: 'micro_posts#delete'
get '/comments', to: 'comments#get'
post '/newcomment', to: 'comments#new'

Binary file not shown.

View File

@ -0,0 +1,5 @@
class AddEngagedPeopleNamesToMicroPosts < ActiveRecord::Migration[5.0]
def change
add_column :micro_posts, :engaged_people_names, :text
end
end

View File

@ -0,0 +1,5 @@
class AddVerifyCodeToUsers < ActiveRecord::Migration[5.0]
def change
add_column :users, :verify_code, :string
end
end

View File

@ -0,0 +1,5 @@
class RemoveAcademyFromUser < ActiveRecord::Migration[5.0]
def change
remove_column :users, :academy, :string
end
end

View File

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20161129085653) do
ActiveRecord::Schema.define(version: 20170114044144) do
create_table "comments", force: :cascade do |t|
t.string "content"
@ -41,6 +41,7 @@ ActiveRecord::Schema.define(version: 20161129085653) do
t.integer "user_id"
t.integer "engage_people"
t.string "title"
t.text "engaged_people_names"
end
create_table "users", force: :cascade do |t|
@ -48,11 +49,11 @@ ActiveRecord::Schema.define(version: 20161129085653) do
t.string "email"
t.string "picurl"
t.string "profession"
t.string "academy"
t.boolean "sexual"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "password_digest"
t.string "verify_code"
end
end

101
herokulog.txt Normal file
View File

@ -0,0 +1,101 @@
2016-12-27T14:26:30.434989+00:00 app[web.1]: I, [2016-12-27T14:26:30.434940 #4] INFO -- : [bab85abb-1e49-4592-a08e-17e303e12337] Rendered layouts/_refer.html.erb (0.0ms)
2016-12-27T14:26:30.435224+00:00 app[web.1]: I, [2016-12-27T14:26:30.435180 #4] INFO -- : [bab85abb-1e49-4592-a08e-17e303e12337] Completed 200 OK in 84ms (Views: 3.7ms | ActiveRecord: 3.2ms)
2016-12-27T14:26:30.437771+00:00 heroku[router]: at=info method=POST path="/users" host=se-guoren-test.herokuapp.com request_id=bab85abb-1e49-4592-a08e-17e303e12337 fwd="121.195.114.11" dyno=web.1 connect=1ms service=91ms status=200 bytes=8670
2016-12-27T14:26:30.952100+00:00 heroku[router]: at=info method=GET path="/stylesheets/jquery.fancybox.css" host=se-guoren-test.herokuapp.com request_id=0372c738-9a6f-4b5d-a68b-3ee8b70ef463 fwd="121.195.114.11" dyno=web.1 connect=1ms service=1ms status=304 bytes=48
2016-12-27T14:26:43.970062+00:00 heroku[router]: at=info method=POST path="/users" host=se-guoren-test.herokuapp.com request_id=54f81ac3-fc75-47c7-8073-e8a0fe4aabeb fwd="121.195.114.11" dyno=web.1 connect=1ms service=88ms status=302 bytes=828
2016-12-27T14:26:43.886254+00:00 app[web.1]: I, [2016-12-27T14:26:43.886205 #4] INFO -- : [54f81ac3-fc75-47c7-8073-e8a0fe4aabeb] Processing by UsersController#create as HTML
2016-12-27T14:26:43.885608+00:00 app[web.1]: I, [2016-12-27T14:26:43.885530 #4] INFO -- : [54f81ac3-fc75-47c7-8073-e8a0fe4aabeb] Started POST "/users" for 121.195.114.11 at 2016-12-27 14:26:43 +0000
2016-12-27T14:26:43.886317+00:00 app[web.1]: I, [2016-12-27T14:26:43.886276 #4] INFO -- : [54f81ac3-fc75-47c7-8073-e8a0fe4aabeb] Parameters: {"utf8"=>"✓", "authenticity_token"=>"icK/M7hdBHuCBWyWPM3N6Rw2RjeZrxQHPwwc6GTvdZnKOmYM8GstjCvGhbey5je6TZOa/EJQzSSMgMz8izhGfg==", "user"=>{"name"=>"张大于", "email"=>"zxy@ucas.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "commit"=>"注册"}
2016-12-27T14:26:43.960358+00:00 app[web.1]: D, [2016-12-27T14:26:43.960262 #4] DEBUG -- : [54f81ac3-fc75-47c7-8073-e8a0fe4aabeb]  (0.6ms) BEGIN
2016-12-27T14:26:43.962468+00:00 app[web.1]: D, [2016-12-27T14:26:43.962418 #4] DEBUG -- : [54f81ac3-fc75-47c7-8073-e8a0fe4aabeb] User Exists (0.9ms) SELECT 1 AS one FROM "users" WHERE LOWER("users"."name") = LOWER($1) LIMIT $2 [["name", "张大于"], ["LIMIT", 1]]
2016-12-27T14:26:43.966355+00:00 app[web.1]: D, [2016-12-27T14:26:43.966304 #4] DEBUG -- : [54f81ac3-fc75-47c7-8073-e8a0fe4aabeb] SQL (0.9ms) INSERT INTO "users" ("name", "email", "picurl", "created_at", "updated_at", "password_digest") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["name", "张大于"], ["email", "zxy@ucas.com"], ["picurl", "images/avatars/default/avatar.png"], ["created_at", 2016-12-27 14:26:43 UTC], ["updated_at", 2016-12-27 14:26:43 UTC], ["password_digest", "$2a$10$NbxhrvZAJnin7CynJIpWWu7lFpR2wqZaG6e7UPpwMMfpIRPpoQUvi"]]
2016-12-27T14:26:43.963732+00:00 app[web.1]: D, [2016-12-27T14:26:43.963669 #4] DEBUG -- : [54f81ac3-fc75-47c7-8073-e8a0fe4aabeb] User Exists (0.8ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = $1 LIMIT $2 [["email", "zxy@ucas.com"], ["LIMIT", 1]]
2016-12-27T14:26:43.968484+00:00 app[web.1]: D, [2016-12-27T14:26:43.968433 #4] DEBUG -- : [54f81ac3-fc75-47c7-8073-e8a0fe4aabeb]  (1.5ms) COMMIT
2016-12-27T14:26:43.968946+00:00 app[web.1]: I, [2016-12-27T14:26:43.968897 #4] INFO -- : [54f81ac3-fc75-47c7-8073-e8a0fe4aabeb] Redirected to http://se-guoren-test.herokuapp.com/main
2016-12-27T14:26:43.969092+00:00 app[web.1]: I, [2016-12-27T14:26:43.969050 #4] INFO -- : [54f81ac3-fc75-47c7-8073-e8a0fe4aabeb] Completed 302 Found in 83ms (ActiveRecord: 4.7ms)
2016-12-27T14:26:44.457630+00:00 app[web.1]: I, [2016-12-27T14:26:44.457541 #4] INFO -- : [aea6357e-ec23-41ea-aeed-4192484c6e92] Started GET "/main" for 121.195.114.11 at 2016-12-27 14:26:44 +0000
2016-12-27T14:26:44.459049+00:00 app[web.1]: I, [2016-12-27T14:26:44.458997 #4] INFO -- : [aea6357e-ec23-41ea-aeed-4192484c6e92] Processing by MainController#show as HTML
2016-12-27T14:26:44.466723+00:00 app[web.1]: D, [2016-12-27T14:26:44.466667 #4] DEBUG -- : [aea6357e-ec23-41ea-aeed-4192484c6e92] User Load (0.8ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 4], ["LIMIT", 1]]
2016-12-27T14:26:44.473385+00:00 app[web.1]: D, [2016-12-27T14:26:44.473325 #4] DEBUG -- : [aea6357e-ec23-41ea-aeed-4192484c6e92]  (1.0ms) SELECT COUNT(*) FROM "micro_posts" WHERE "micro_posts"."post_type" IN (1, 2, 3)
2016-12-27T14:26:44.475919+00:00 app[web.1]: D, [2016-12-27T14:26:44.475869 #4] DEBUG -- : [aea6357e-ec23-41ea-aeed-4192484c6e92] MicroPost Load (1.1ms) SELECT "micro_posts".* FROM "micro_posts" WHERE "micro_posts"."post_type" IN (1, 2, 3) ORDER BY "micro_posts"."post_time" DESC LIMIT $1 OFFSET $2 [["LIMIT", 10], ["OFFSET", 0]]
2016-12-27T14:26:44.497013+00:00 app[web.1]: D, [2016-12-27T14:26:44.496933 #4] DEBUG -- : [aea6357e-ec23-41ea-aeed-4192484c6e92] User Load (1.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 3], ["LIMIT", 1]]
2016-12-27T14:26:44.499218+00:00 app[web.1]: D, [2016-12-27T14:26:44.499115 #4] DEBUG -- : [aea6357e-ec23-41ea-aeed-4192484c6e92] User Load (0.8ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 2], ["LIMIT", 1]]
2016-12-27T14:26:44.500171+00:00 app[web.1]: D, [2016-12-27T14:26:44.500121 #4] DEBUG -- : [aea6357e-ec23-41ea-aeed-4192484c6e92] CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 2], ["LIMIT", 1]]
2016-12-27T14:26:44.502057+00:00 app[web.1]: D, [2016-12-27T14:26:44.502007 #4] DEBUG -- : [aea6357e-ec23-41ea-aeed-4192484c6e92] User Load (0.8ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
2016-12-27T14:26:44.503174+00:00 app[web.1]: D, [2016-12-27T14:26:44.503115 #4] DEBUG -- : [aea6357e-ec23-41ea-aeed-4192484c6e92] CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
2016-12-27T14:26:44.504166+00:00 app[web.1]: D, [2016-12-27T14:26:44.504114 #4] DEBUG -- : [aea6357e-ec23-41ea-aeed-4192484c6e92] CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
2016-12-27T14:26:44.505148+00:00 app[web.1]: D, [2016-12-27T14:26:44.505100 #4] DEBUG -- : [aea6357e-ec23-41ea-aeed-4192484c6e92] CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
2016-12-27T14:26:44.506694+00:00 app[web.1]: I, [2016-12-27T14:26:44.506634 #4] INFO -- : [aea6357e-ec23-41ea-aeed-4192484c6e92] Rendering main/main.html.erb within layouts/application
2016-12-27T14:26:44.509447+00:00 app[web.1]: I, [2016-12-27T14:26:44.509384 #4] INFO -- : [aea6357e-ec23-41ea-aeed-4192484c6e92] Rendered layouts/_nav.html.erb (0.5ms)
2016-12-27T14:26:44.521463+00:00 app[web.1]: D, [2016-12-27T14:26:44.521398 #4] DEBUG -- : [aea6357e-ec23-41ea-aeed-4192484c6e92]  (1.1ms) SELECT COUNT(*) FROM "micro_posts" WHERE "micro_posts"."user_id" = $1 AND "micro_posts"."id" = $2 [["user_id", 4], ["id", 7]]
2016-12-27T14:26:44.523387+00:00 app[web.1]: D, [2016-12-27T14:26:44.523325 #4] DEBUG -- : [aea6357e-ec23-41ea-aeed-4192484c6e92]  (0.8ms) SELECT COUNT(*) FROM "micro_posts" WHERE "micro_posts"."user_id" = $1 AND "micro_posts"."id" = $2 [["user_id", 4], ["id", 6]]
2016-12-27T14:26:44.525175+00:00 app[web.1]: D, [2016-12-27T14:26:44.525121 #4] DEBUG -- : [aea6357e-ec23-41ea-aeed-4192484c6e92]  (0.8ms) SELECT COUNT(*) FROM "micro_posts" WHERE "micro_posts"."user_id" = $1 AND "micro_posts"."id" = $2 [["user_id", 4], ["id", 5]]
2016-12-27T14:26:44.526840+00:00 app[web.1]: D, [2016-12-27T14:26:44.526785 #4] DEBUG -- : [aea6357e-ec23-41ea-aeed-4192484c6e92]  (0.8ms) SELECT COUNT(*) FROM "micro_posts" WHERE "micro_posts"."user_id" = $1 AND "micro_posts"."id" = $2 [["user_id", 4], ["id", 4]]
2016-12-27T14:26:44.527609+00:00 app[web.1]: D, [2016-12-27T14:26:44.527563 #4] DEBUG -- : [aea6357e-ec23-41ea-aeed-4192484c6e92]  (0.6ms) BEGIN
2016-12-27T14:26:44.529719+00:00 app[web.1]: D, [2016-12-27T14:26:44.529663 #4] DEBUG -- : [aea6357e-ec23-41ea-aeed-4192484c6e92] MicroPost Load (0.8ms) SELECT "micro_posts".* FROM "micro_posts" WHERE "micro_posts"."id" = $1 LIMIT $2 FOR UPDATE [["id", 4], ["LIMIT", 1]]
2016-12-27T14:26:44.531628+00:00 app[web.1]: D, [2016-12-27T14:26:44.531560 #4] DEBUG -- : [aea6357e-ec23-41ea-aeed-4192484c6e92]  (1.6ms) COMMIT
2016-12-27T14:26:44.532749+00:00 app[web.1]: I, [2016-12-27T14:26:44.532686 #4] INFO -- : [aea6357e-ec23-41ea-aeed-4192484c6e92] Rendered main/main.html.erb within layouts/application (25.9ms)
2016-12-27T14:26:44.532962+00:00 app[web.1]: I, [2016-12-27T14:26:44.532910 #4] INFO -- : [aea6357e-ec23-41ea-aeed-4192484c6e92] Completed 500 Internal Server Error in 74ms (ActiveRecord: 16.0ms)
2016-12-27T14:26:44.533988+00:00 app[web.1]: F, [2016-12-27T14:26:44.533939 #4] FATAL -- : [aea6357e-ec23-41ea-aeed-4192484c6e92]
2016-12-27T14:26:44.534039+00:00 app[web.1]: F, [2016-12-27T14:26:44.533991 #4] FATAL -- : [aea6357e-ec23-41ea-aeed-4192484c6e92] ActionView::Template::Error (undefined method `split' for nil:NilClass):
2016-12-27T14:26:44.534252+00:00 app[web.1]: F, [2016-12-27T14:26:44.534209 #4] FATAL -- : [aea6357e-ec23-41ea-aeed-4192484c6e92] 35: <% if micro_post_belong_to_user(micro_post["postid"], @user) == false %>
2016-12-27T14:26:44.534253+00:00 app[web.1]: [aea6357e-ec23-41ea-aeed-4192484c6e92] 36: <% if micro_post["type"] == "组团信息" %>
2016-12-27T14:26:44.534254+00:00 app[web.1]: [aea6357e-ec23-41ea-aeed-4192484c6e92] 37: <div class="social-button">
2016-12-27T14:26:44.534254+00:00 app[web.1]: [aea6357e-ec23-41ea-aeed-4192484c6e92] 38: <% if joinded_activity(micro_post["postid"], @user.name) %>
2016-12-27T14:26:44.534255+00:00 app[web.1]: [aea6357e-ec23-41ea-aeed-4192484c6e92] 39: <button class="btn btn-lg btn-success-outline activity">取消报名</button>
2016-12-27T14:26:44.534255+00:00 app[web.1]: [aea6357e-ec23-41ea-aeed-4192484c6e92] 40: <div class="activity-detail text-center"></div>
2016-12-27T14:26:44.534256+00:00 app[web.1]: [aea6357e-ec23-41ea-aeed-4192484c6e92] 41: <% else %>
2016-12-27T14:26:44.534595+00:00 app[web.1]: F, [2016-12-27T14:26:44.534293 #4] FATAL -- : [aea6357e-ec23-41ea-aeed-4192484c6e92] app/helpers/main_helper.rb:84:in `joinded_activity'
2016-12-27T14:26:44.534285+00:00 app[web.1]: F, [2016-12-27T14:26:44.534249 #4] FATAL -- : [aea6357e-ec23-41ea-aeed-4192484c6e92]
2016-12-27T14:26:44.534597+00:00 app[web.1]: [aea6357e-ec23-41ea-aeed-4192484c6e92] app/views/main/main.html.erb:38:in `block in _app_views_main_main_html_erb___4319673276589869370_70143703684160'
2016-12-27T14:26:44.534598+00:00 app[web.1]: [aea6357e-ec23-41ea-aeed-4192484c6e92] app/views/main/main.html.erb:9:in `each'
2016-12-27T14:26:44.534598+00:00 app[web.1]: [aea6357e-ec23-41ea-aeed-4192484c6e92] app/views/main/main.html.erb:9:in `_app_views_main_main_html_erb___4319673276589869370_70143703684160'
2016-12-27T14:26:44.534599+00:00 app[web.1]: [aea6357e-ec23-41ea-aeed-4192484c6e92] app/controllers/main_controller.rb:20:in `show'
2016-12-27T14:26:44.535884+00:00 heroku[router]: at=info method=GET path="/main" host=se-guoren-test.herokuapp.com request_id=aea6357e-ec23-41ea-aeed-4192484c6e92 fwd="121.195.114.11" dyno=web.1 connect=1ms service=80ms status=500 bytes=1669
2016-12-27T14:26:45.223095+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=se-guoren-test.herokuapp.com request_id=0d25c158-b1da-4546-a322-e48a2230ab61 fwd="121.195.114.11" dyno=web.1 connect=1ms service=2ms status=304 bytes=48
2016-12-27T14:29:29.932926+00:00 heroku[router]: at=info method=GET path="/" host=se-guoren-test.herokuapp.com request_id=18e46fba-6a36-458f-9843-5dba1ac4b9e5 fwd="121.195.114.11" dyno=web.1 connect=0ms service=7ms status=302 bytes=828
2016-12-27T14:29:29.930708+00:00 app[web.1]: I, [2016-12-27T14:29:29.930627 #4] INFO -- : [18e46fba-6a36-458f-9843-5dba1ac4b9e5] Started GET "/" for 121.195.114.11 at 2016-12-27 14:29:29 +0000
2016-12-27T14:29:29.931476+00:00 app[web.1]: I, [2016-12-27T14:29:29.931414 #4] INFO -- : [18e46fba-6a36-458f-9843-5dba1ac4b9e5] Processing by LoginController#init as HTML
2016-12-27T14:29:29.936110+00:00 app[web.1]: I, [2016-12-27T14:29:29.935669 #4] INFO -- : [18e46fba-6a36-458f-9843-5dba1ac4b9e5] Redirected to http://se-guoren-test.herokuapp.com/main
2016-12-27T14:29:29.935213+00:00 app[web.1]: D, [2016-12-27T14:29:29.935144 #4] DEBUG -- : [18e46fba-6a36-458f-9843-5dba1ac4b9e5] User Load (1.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 4], ["LIMIT", 1]]
2016-12-27T14:29:29.936286+00:00 app[web.1]: I, [2016-12-27T14:29:29.936233 #4] INFO -- : [18e46fba-6a36-458f-9843-5dba1ac4b9e5] Completed 302 Found in 5ms (ActiveRecord: 1.0ms)
2016-12-27T14:29:30.436680+00:00 app[web.1]: I, [2016-12-27T14:29:30.436607 #4] INFO -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] Started GET "/main" for 121.195.114.11 at 2016-12-27 14:29:30 +0000
2016-12-27T14:29:30.437590+00:00 app[web.1]: I, [2016-12-27T14:29:30.437541 #4] INFO -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] Processing by MainController#show as HTML
2016-12-27T14:29:30.440124+00:00 app[web.1]: D, [2016-12-27T14:29:30.440073 #4] DEBUG -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] User Load (1.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 4], ["LIMIT", 1]]
2016-12-27T14:29:30.443043+00:00 app[web.1]: D, [2016-12-27T14:29:30.442991 #4] DEBUG -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca]  (1.1ms) SELECT COUNT(*) FROM "micro_posts" WHERE "micro_posts"."post_type" IN (1, 2, 3)
2016-12-27T14:29:30.444967+00:00 app[web.1]: D, [2016-12-27T14:29:30.444886 #4] DEBUG -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] MicroPost Load (0.9ms) SELECT "micro_posts".* FROM "micro_posts" WHERE "micro_posts"."post_type" IN (1, 2, 3) ORDER BY "micro_posts"."post_time" DESC LIMIT $1 OFFSET $2 [["LIMIT", 10], ["OFFSET", 0]]
2016-12-27T14:29:30.448145+00:00 app[web.1]: D, [2016-12-27T14:29:30.448090 #4] DEBUG -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] User Load (0.9ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 3], ["LIMIT", 1]]
2016-12-27T14:29:30.451687+00:00 app[web.1]: D, [2016-12-27T14:29:30.451150 #4] DEBUG -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] User Load (1.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 2], ["LIMIT", 1]]
2016-12-27T14:29:30.453803+00:00 app[web.1]: D, [2016-12-27T14:29:30.453735 #4] DEBUG -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 2], ["LIMIT", 1]]
2016-12-27T14:29:30.456533+00:00 app[web.1]: D, [2016-12-27T14:29:30.456469 #4] DEBUG -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] User Load (0.9ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
2016-12-27T14:29:30.458003+00:00 app[web.1]: D, [2016-12-27T14:29:30.457946 #4] DEBUG -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
2016-12-27T14:29:30.459203+00:00 app[web.1]: D, [2016-12-27T14:29:30.459148 #4] DEBUG -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
2016-12-27T14:29:30.460470+00:00 app[web.1]: D, [2016-12-27T14:29:30.460401 #4] DEBUG -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
2016-12-27T14:29:30.461628+00:00 app[web.1]: I, [2016-12-27T14:29:30.461556 #4] INFO -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] Rendering main/main.html.erb within layouts/application
2016-12-27T14:29:30.461986+00:00 app[web.1]: I, [2016-12-27T14:29:30.461928 #4] INFO -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] Rendered layouts/_nav.html.erb (0.1ms)
2016-12-27T14:29:30.464536+00:00 app[web.1]: D, [2016-12-27T14:29:30.464473 #4] DEBUG -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca]  (0.9ms) SELECT COUNT(*) FROM "micro_posts" WHERE "micro_posts"."user_id" = $1 AND "micro_posts"."id" = $2 [["user_id", 4], ["id", 7]]
2016-12-27T14:29:30.466248+00:00 app[web.1]: D, [2016-12-27T14:29:30.466190 #4] DEBUG -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca]  (0.8ms) SELECT COUNT(*) FROM "micro_posts" WHERE "micro_posts"."user_id" = $1 AND "micro_posts"."id" = $2 [["user_id", 4], ["id", 6]]
2016-12-27T14:29:30.467999+00:00 app[web.1]: D, [2016-12-27T14:29:30.467925 #4] DEBUG -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca]  (0.7ms) SELECT COUNT(*) FROM "micro_posts" WHERE "micro_posts"."user_id" = $1 AND "micro_posts"."id" = $2 [["user_id", 4], ["id", 5]]
2016-12-27T14:29:30.469758+00:00 app[web.1]: D, [2016-12-27T14:29:30.469701 #4] DEBUG -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca]  (0.9ms) SELECT COUNT(*) FROM "micro_posts" WHERE "micro_posts"."user_id" = $1 AND "micro_posts"."id" = $2 [["user_id", 4], ["id", 4]]
2016-12-27T14:29:30.474100+00:00 app[web.1]: D, [2016-12-27T14:29:30.474038 #4] DEBUG -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca]  (4.1ms) BEGIN
2016-12-27T14:29:30.475980+00:00 app[web.1]: D, [2016-12-27T14:29:30.475926 #4] DEBUG -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] MicroPost Load (1.1ms) SELECT "micro_posts".* FROM "micro_posts" WHERE "micro_posts"."id" = $1 LIMIT $2 FOR UPDATE [["id", 4], ["LIMIT", 1]]
2016-12-27T14:29:30.477880+00:00 app[web.1]: D, [2016-12-27T14:29:30.477830 #4] DEBUG -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca]  (1.6ms) COMMIT
2016-12-27T14:29:30.479027+00:00 app[web.1]: I, [2016-12-27T14:29:30.478976 #4] INFO -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] Rendered main/main.html.erb within layouts/application (17.3ms)
2016-12-27T14:29:30.479182+00:00 app[web.1]: I, [2016-12-27T14:29:30.479139 #4] INFO -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] Completed 500 Internal Server Error in 41ms (ActiveRecord: 16.1ms)
2016-12-27T14:29:30.480397+00:00 app[web.1]: F, [2016-12-27T14:29:30.480330 #4] FATAL -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca]
2016-12-27T14:29:30.480471+00:00 app[web.1]: F, [2016-12-27T14:29:30.480409 #4] FATAL -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] ActionView::Template::Error (undefined method `split' for nil:NilClass):
2016-12-27T14:29:30.481135+00:00 app[web.1]: F, [2016-12-27T14:29:30.481086 #4] FATAL -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] 35: <% if micro_post_belong_to_user(micro_post["postid"], @user) == false %>
2016-12-27T14:29:30.481136+00:00 app[web.1]: [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] 36: <% if micro_post["type"] == "组团信息" %>
2016-12-27T14:29:30.481137+00:00 app[web.1]: [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] 37: <div class="social-button">
2016-12-27T14:29:30.481137+00:00 app[web.1]: [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] 38: <% if joinded_activity(micro_post["postid"], @user.name) %>
2016-12-27T14:29:30.481138+00:00 app[web.1]: [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] 39: <button class="btn btn-lg btn-success-outline activity">取消报名</button>
2016-12-27T14:29:30.481139+00:00 app[web.1]: [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] 40: <div class="activity-detail text-center"></div>
2016-12-27T14:29:30.481139+00:00 app[web.1]: [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] 41: <% else %>
2016-12-27T14:29:30.481185+00:00 app[web.1]: F, [2016-12-27T14:29:30.481134 #4] FATAL -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca]
2016-12-27T14:29:30.481258+00:00 app[web.1]: F, [2016-12-27T14:29:30.481202 #4] FATAL -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] app/helpers/main_helper.rb:84:in `joinded_activity'
2016-12-27T14:29:30.481259+00:00 app[web.1]: [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] app/views/main/main.html.erb:38:in `block in _app_views_main_main_html_erb___4319673276589869370_70143703684160'
2016-12-27T14:29:30.481260+00:00 app[web.1]: [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] app/views/main/main.html.erb:9:in `each'
2016-12-27T14:29:30.481260+00:00 app[web.1]: [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] app/views/main/main.html.erb:9:in `_app_views_main_main_html_erb___4319673276589869370_70143703684160'
2016-12-27T14:29:30.481261+00:00 app[web.1]: [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] app/controllers/main_controller.rb:20:in `show'
2016-12-27T14:29:30.477775+00:00 heroku[router]: at=info method=GET path="/main" host=se-guoren-test.herokuapp.com request_id=eae3fb5a-320d-4195-90cf-49a09fc7b6ca fwd="121.195.114.11" dyno=web.1 connect=0ms service=47ms status=500 bytes=1669
2016-12-27T14:29:31.399894+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=se-guoren-test.herokuapp.com request_id=b29e3681-6702-4e54-812e-f17760fa4d4a fwd="121.195.114.11" dyno=web.1 connect=0ms service=3ms status=304 bytes=48

View File

View File

@ -134,12 +134,26 @@
.widget-container .heading [class^="icon-"], .widget-container .heading [class*="icon-"] {
font-size: 20px;
}
.pagination .previous_page {
font-size: 2em;
margin-right: 20px;
}
.pagination .next_page {
font-size: 2em;
margin-left: 20px;
}
.posts .micro-post .widget-container.scrollable {
height: 250px;
}
.widget-container.fluid-height.scrollable.list.user-comments p {
margin: 0px;
}
.activity-details p {
font-size: 1.2em;
}

View File

@ -0,0 +1,4 @@
# Preview all emails at http://localhost:3000/rails/mailers/user_mailer
class UserMailerPreview < ActionMailer::Preview
end

View File

@ -0,0 +1,7 @@
require 'test_helper'
class UserMailerTest < ActionMailer::TestCase
# test "the truth" do
# assert true
# end
end

View File

@ -1,120 +0,0 @@
<HTML>
<HEAD>
<script type="text/javascript">
var i = 0; // 用来动态生成span,upfile的id
function addAttachmentToList()
{
if (findAttachment(event.srcElement.value)) return; //如果此文档已在图片列表中则不再添加
// 动态创建图片信息栏并添加到图片列表中
var span = document.createElement('span');
span.id = '_attachment' + i;
span.innerHTML = extractFileName(event.srcElement.value) + '&nbsp;<a href="javascript:delAttachment(' + (i++) + ')"><font color="blue">删除</font></a><br/>';
span.title = event.srcElement.value;
G('attachmentList').appendChild(span);
// 显示图片列表并变换添加图片按钮文本
if (G('attachmentList').style.display == 'none')
{
G('btnAdd').value = '继续添加';
G('attachmentList').style.display = '';
G('btnClear').style.display = '';
}
G('total').innerText = '当前选择上传'+ G('attachmentList').childNodes.length + '个图片';
}
function selectAttachment()
{
// 先清除无效动态生成的多余upfile
cleanInvalidUpfile();
// 动态创建上传控件并与span对应
var upfile = '<input type="file" style="display:none" onchange="addAttachmentToList();" id="_upfile'+i+'">';
document.body.insertAdjacentHTML('beforeEnd', upfile);
G('_upfile'+i).click();
}
function extractFileName(fn)
{
return fn.substr(fn.lastIndexOf('\\')+1);
}
function findAttachment(fn)
{
var o = G('attachmentList').getElementsByTagName('span');
for(var i=0;i<o.length;i++)
if (o[i].title == fn) return true;
return false;
}
function delAttachment(id)
{
G('attachmentList').removeChild(G('_attachment'+id));
document.body.removeChild(G('_upfile'+id));
// 当图片列表为空则不显示并且变化添加图片按钮文本
if (G('attachmentList').childNodes.length == 0)
{
G('btnAdd').value = '添加图片';
G('attachmentList').style.display = 'none';
G('btnClear').style.display = 'none';
}
G('total').innerText = '当前选择上传'+ G('attachmentList').childNodes.length + '个图片';
}
function cleanInvalidUpfile()
{
var o = document.body.getElementsByTagName('input');
for(var i=o.length-1;i>=0;i--)
if (o[i].type == 'file' && o[i].id.indexOf('_upfile') == 0)
{
if (!G('_attachment'+o[i].id.substr(7)))
document.body.removeChild(o[i]);
}
}
function clearAttachment()
{
var o = G('attachmentList').childNodes;
for(var i=o.length-1;i>=0;i--)
G('attachmentList').removeChild(o[i]);
o = document.body.getElementsByTagName('input');
for(var i=o.length-1;i>=0;i--)
if (o[i].type == 'file' && o[i].id.indexOf('_upfile') == 0)
{
document.body.removeChild(o[i]);
}
G('btnAdd').value = '添加图片';
G('attachmentList').style.display = 'none';
G('btnClear').style.display = 'none';
G('total').innerText = '当前选择上传0个图片';
}
function getAttachmentInfo()
{
// 已知的js获取本地文件大小的三种方式
}
function G(id)
{
return document.getElementById(id);
}
</script>
</HEAD>
<BODY>
<form action="#">
<input type="button" value="添加图片" id="btnAdd" onclick="selectAttachment();">&nbsp;
<input type="button" value="清空图片" id="btnClear" style="display:none" onclick="clearAttachment();">
<div id="attachmentList" style="margin:3px 0px 0px 0px;padding:4px 3px 4px 3px;display:none;border:1px solid "></div>
<div id="total" style="margin:3px 0px 0px 0px;">当前选择上传0个图片</div>
<div style="padding10px 3px"><input type="submit" value="上传"></div>
</form>
</BODY>
</HTML>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,27 +0,0 @@
# 张裕
------------------------
分页功能 张裕
简单的组团、失物招领动态 张裕
网站整体时间修改 张裕
动态排行榜(评论数、组团人数) 张裕
用户个人动态的评论显示 尹
用户个人动态的删除 尹
# 朱京乔
------------------------
多图上传 朱京乔
# 尹吉宪
------------------------
用户个人资料修改 尹
忘记密码功能的实现 尹
# 白芳洲
------------------------
测试 白
整体代码检测与bug捕捉 白
# 倪令斌
-------------------------
部署 倪
公告 倪