一些修改

This commit is contained in:
huang 2018-02-28 19:34:48 +08:00
parent 2128a240c1
commit 95b0de64b5
32 changed files with 875 additions and 304 deletions

View File

@ -123,6 +123,7 @@
</content>
<orderEntry type="jdk" jdkName="RVM: ruby-2.3.0" jdkType="RUBY_SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" scope="PROVIDED" name="CFPropertyList (v2.3.6, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="actionmailer (v4.2.8, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="actionpack (v4.2.8, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="actionview (v4.2.8, RVM: ruby-2.3.0) [gem]" level="application" />
@ -137,6 +138,7 @@
<orderEntry type="library" scope="PROVIDED" name="builder (v3.2.3, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.16.0, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="byebug (v9.1.0, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="carrierwave (v0.10.0, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="coderay (v1.1.2, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="coffee-rails (v4.1.1, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="coffee-script (v2.4.1, RVM: ruby-2.3.0) [gem]" level="application" />
@ -144,14 +146,42 @@
<orderEntry type="library" scope="PROVIDED" name="concurrent-ruby (v1.0.5, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="crass (v1.0.3, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="erubis (v2.7.0, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="excon (v0.60.0, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="execjs (v2.7.0, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="faker (v1.4.2, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="ffi (v1.9.18, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="fission (v0.5.0, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="fog (v1.36.0, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="fog-aliyun (v0.2.0, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="fog-atmos (v0.1.0, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="fog-aws (v2.0.0, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="fog-brightbox (v0.14.0, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="fog-core (v1.45.0, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="fog-dynect (v0.0.3, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="fog-ecloud (v0.3.0, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="fog-google (v0.1.0, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="fog-json (v1.0.2, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="fog-local (v0.5.0, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="fog-powerdns (v0.1.1, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="fog-profitbricks (v4.1.1, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="fog-radosgw (v0.0.5, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="fog-riakcs (v0.1.0, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="fog-sakuracloud (v1.7.5, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="fog-serverlove (v0.1.2, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="fog-softlayer (v1.1.4, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="fog-storm_on_demand (v0.1.1, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="fog-terremark (v0.1.0, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="fog-vmfusion (v0.1.0, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="fog-voxel (v0.1.0, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="fog-xenserver (v0.3.0, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="fog-xml (v0.1.3, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="formatador (v0.2.5, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="globalid (v0.4.1, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="guard (v2.14.2, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="guard-minitest (v2.3.1, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="i18n (v0.9.3, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="inflecto (v0.0.2, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="ipaddress (v0.8.3, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="jbuilder (v2.7.0, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="jquery-rails (v4.3.1, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="json (v1.8.6, RVM: ruby-2.3.0) [gem]" level="application" />
@ -161,7 +191,10 @@
<orderEntry type="library" scope="PROVIDED" name="lumberjack (v1.0.12, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="mail (v2.7.0, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="method_source (v0.9.0, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="mime-types (v3.1, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="mime-types-data (v3.2016.0521, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="mini_backtrace (v0.1.3, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="mini_magick (v3.8.0, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="mini_mime (v1.0.0, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="mini_portile2 (v2.3.0, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="minitest (v5.11.1, RVM: ruby-2.3.0) [gem]" level="application" />
@ -195,7 +228,7 @@
<orderEntry type="library" scope="PROVIDED" name="spring (v2.0.2, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="sprockets (v3.7.1, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="sprockets-rails (v3.2.1, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="strong_parameters (v0.1.4, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="subexec (v0.2.3, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="therubyracer (v0.12.3, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="thor (v0.20.0, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="thread_safe (v0.3.6, RVM: ruby-2.3.0) [gem]" level="application" />
@ -205,6 +238,7 @@
<orderEntry type="library" scope="PROVIDED" name="tzinfo (v1.2.4, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="uglifier (v4.1.4, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="will_paginate (v3.0.7, RVM: ruby-2.3.0) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="xml-simple (v1.1.5, RVM: ruby-2.3.0) [gem]" level="application" />
</component>
<component name="RModuleSettingsStorage">
<LOAD_PATH number="0" />

View File

@ -28,101 +28,11 @@
</component>
<component name="FileEditorManager">
<leaf>
<file leaf-file-name="user.rb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/models/user.rb">
<file leaf-file-name="application_helper.rb" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/app/helpers/application_helper.rb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="1" column="17" selection-start-line="1" selection-start-column="17" selection-end-line="1" selection-end-column="17" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="questions_controller.rb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/controllers/questions_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="10" column="25" selection-start-line="10" selection-start-column="25" selection-end-line="10" selection-end-column="25" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="_question.html.erb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/views/questions/_question.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-1.2659575">
<caret line="7" column="5" selection-start-line="7" selection-start-column="5" selection-end-line="7" selection-end-column="5" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="user_mailer_preview.rb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/test/mailers/previews/user_mailer_preview.rb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="17" column="3" selection-start-line="17" selection-start-column="3" selection-end-line="17" selection-end-column="3" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="users_controller.rb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/controllers/users_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="13" column="0" selection-start-line="13" selection-start-column="0" selection-end-line="13" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="seeds.rb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/db/seeds.rb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="16" column="26" selection-start-line="16" selection-start-column="26" selection-end-line="16" selection-end-column="26" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="_question.json.jbuilder" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/views/questions/_question.json.jbuilder">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.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>
</file>
<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 vertical-scroll-proportion="-3.7777777">
<caret line="8" column="39" selection-start-line="8" selection-start-column="39" selection-end-line="8" selection-end-column="39" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="question.rb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/models/question.rb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="0" column="6" selection-start-line="0" selection-start-column="6" selection-end-line="0" selection-end-column="6" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="20180226144108_create_questions.rb" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/db/migrate/20180226144108_create_questions.rb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.39005736">
<caret line="12" column="0" selection-start-line="12" selection-start-column="0" selection-end-line="12" selection-end-column="0" />
<state vertical-scroll-proportion="0.57347673">
<caret line="22" column="6" selection-start-line="22" selection-start-column="6" selection-end-line="22" selection-end-column="6" />
<folding />
</state>
</provider>
@ -133,12 +43,6 @@
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/app/views/welcomes/help.html.erb" />
<option value="$PROJECT_DIR$/config/initializers/backtrace_silencers.rb" />
<option value="$PROJECT_DIR$/app/helpers/application_helper.rb" />
<option value="$PROJECT_DIR$/app/views/welcomes/home.html.erb" />
<option value="$PROJECT_DIR$/app/assets/stylesheets/application.css.scss" />
<option value="$PROJECT_DIR$/test/integration/site_layout_test.rb" />
<option value="$PROJECT_DIR$/app/views/layouts/_footer.html.erb" />
<option value="$PROJECT_DIR$/app/views/users/show.html.erb" />
<option value="$PROJECT_DIR$/app/views/users/new.html.erb" />
@ -158,8 +62,6 @@
<option value="$PROJECT_DIR$/test/controllers/welcomes_controller_test.rb" />
<option value="$PROJECT_DIR$/test/models/user_test.rb" />
<option value="$PROJECT_DIR$/test/integration/users_login_test.rb" />
<option value="$PROJECT_DIR$/app/views/sessions/new.html.erb" />
<option value="$PROJECT_DIR$/app/views/layouts/_header.html.erb" />
<option value="$PROJECT_DIR$/app/controllers/sessions_controller.rb" />
<option value="$PROJECT_DIR$/app/helpers/sessions_helper.rb" />
<option value="$PROJECT_DIR$/db/migrate/20180204085651_add_admin_to_users.rb" />
@ -167,7 +69,6 @@
<option value="$PROJECT_DIR$/app/views/users/_user.html.erb" />
<option value="$PROJECT_DIR$/app/views/users/edit.html.erb" />
<option value="$PROJECT_DIR$/config/routes.rb" />
<option value="$PROJECT_DIR$/app/assets/stylesheets/custom.css.scss" />
<option value="$PROJECT_DIR$/db/migrate/20180206065942_add_activation_to_users.rb" />
<option value="$PROJECT_DIR$/app/mailers/user_mailer.rb" />
<option value="$PROJECT_DIR$/app/views/user_mailer/account_activation.text.erb" />
@ -176,14 +77,23 @@
<option value="$PROJECT_DIR$/config/environments/test.rb" />
<option value="$PROJECT_DIR$/test/mailers/user_mailer_test.rb" />
<option value="$PROJECT_DIR$/test/mailers/previews/user_mailer_preview.rb" />
<option value="$PROJECT_DIR$/app/controllers/users_controller.rb" />
<option value="$PROJECT_DIR$/Gemfile" />
<option value="$PROJECT_DIR$/db/migrate/20180226141108_create_questions.rb" />
<option value="$PROJECT_DIR$/app/models/user.rb" />
<option value="$PROJECT_DIR$/app/views/questions/_question.html.erb" />
<option value="$PROJECT_DIR$/db/seeds.rb" />
<option value="$PROJECT_DIR$/app/models/question.rb" />
<option value="$PROJECT_DIR$/db/migrate/20180226144108_create_questions.rb" />
<option value="$PROJECT_DIR$/Gemfile" />
<option value="$PROJECT_DIR$/app/views/sessions/new.html.erb" />
<option value="$PROJECT_DIR$/app/assets/stylesheets/custom.css.scss" />
<option value="$PROJECT_DIR$/app/views/questions/_form.html.erb" />
<option value="$PROJECT_DIR$/app/views/questions/index.html.erb" />
<option value="$PROJECT_DIR$/app/assets/stylesheets/public.scss" />
<option value="$PROJECT_DIR$/app/views/layouts/_header.html.erb" />
<option value="$PROJECT_DIR$/app/controllers/questions_controller.rb" />
<option value="$PROJECT_DIR$/app/controllers/jobs_controller.rb" />
<option value="$PROJECT_DIR$/app/controllers/users_controller.rb" />
<option value="$PROJECT_DIR$/app/helpers/application_helper.rb" />
</list>
</option>
</component>
@ -202,10 +112,10 @@
<order />
</component>
<component name="ProjectFrameBounds">
<option name="x" value="714" />
<option name="y" value="52" />
<option name="width" value="886" />
<option name="height" value="848" />
<option name="x" value="67" />
<option name="y" value="24" />
<option name="width" value="1533" />
<option name="height" value="876" />
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
<OptionsSetting value="true" id="Add" />
@ -336,6 +246,38 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="uask" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="uask" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="config" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="uask" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="uask" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="config" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="locales" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="uask" />
@ -389,8 +331,22 @@
<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="models" />
<option name="myItemId" value="uask" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="uask" />
<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>
@ -407,6 +363,76 @@
<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_ELEMENT>
<option name="myItemId" value="concerns" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="uask" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="uask" />
<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="assets" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="stylesheets" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="uask" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="uask" />
<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="assets" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="uask" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="uask" />
<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="assets" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="images" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
</subPane>
</pane>
@ -417,7 +443,7 @@
<property name="settings.editor.selected.configurable" value="org.jetbrains.plugins.ruby.settings.RubyActiveModuleSdkConfigurable" />
<property name="settings.editor.splitter.proportion" value="0.2" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="last_opened_file_path" value="$USER_HOME$/sfm" />
<property name="recentsLimit" value="5" />
<property name="byebug.present.asked" value="true" />
<property name="Ruby.ViewRefParam.DefaultExtension" value="html.erb" />
@ -630,10 +656,10 @@
</todo-panel>
</component>
<component name="ToolWindowManager">
<frame x="714" y="52" width="886" height="848" extended-state="4" />
<frame x="67" y="24" width="1533" height="876" 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" weight="0.2952381" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.13786146" sideWeight="0.5" 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" weight="0.32919255" sideWeight="0.49764627" 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" weight="0.32919255" sideWeight="0.5023537" order="8" side_tool="true" content_ui="tabs" />
<window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
@ -643,7 +669,7 @@
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" 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="false" weight="0.16770187" sideWeight="0.49358425" order="11" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" 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="true" weight="0.2882883" sideWeight="0.70073974" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.26956522" sideWeight="0.70073974" 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" 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" weight="0.37018633" sideWeight="0.47679892" 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" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
@ -667,101 +693,16 @@
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
<option name="time" value="8" />
<option name="time" value="10" />
</breakpoint-manager>
<watches-manager>
<configuration name="RailsRunConfigurationType">
<watch expression="@user.email" language="ruby" />
<watch expression="user_params" language="ruby" />
<watch expression="User.new(user_params)" language="ruby" />
<watch expression="type" language="ruby" />
<watch expression="menu" language="ruby" />
</configuration>
</watches-manager>
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/test/integration/users_signup_test.rb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.26254827">
<caret line="8" column="66" selection-start-line="8" selection-start-column="50" selection-end-line="8" selection-end-column="66" />
</state>
</provider>
</entry>
<entry file="file://$APPLICATION_HOME_DIR$/rubystubs22/module.rb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.33204633">
<caret line="464" column="8" selection-start-line="464" selection-start-column="8" selection-end-line="464" selection-end-column="8" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/models/user_test.rb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.22623575">
<caret line="7" column="5" selection-start-line="7" selection-start-column="5" selection-end-line="7" selection-end-column="5" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/integration/users_login_test.rb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.19391635">
<caret line="6" column="50" selection-start-line="6" selection-start-column="50" selection-end-line="6" selection-end-column="50" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/sessions/new.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.816">
<caret line="24" column="6" selection-start-line="24" selection-start-column="6" selection-end-line="24" selection-end-column="6" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/helpers/application_helper.rb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.027642276">
<caret line="1" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="1" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/application_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="5" column="0" selection-start-line="5" selection-start-column="0" selection-end-line="5" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/.rvm/gems/ruby-2.3.0/gems/actionpack-4.2.8/lib/abstract_controller/callbacks.rb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="30" column="51" selection-start-line="30" selection-start-column="27" selection-end-line="30" selection-end-column="51" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/db/migrate/20180204085651_add_admin_to_users.rb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.15454546">
<caret line="5" column="0" selection-start-line="5" selection-start-column="0" selection-end-line="5" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/users/index.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.129771">
<caret line="4" column="15" selection-start-line="4" selection-start-column="15" selection-end-line="4" selection-end-column="15" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/users/_user.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.19465649">
<caret line="6" column="5" selection-start-line="6" selection-start-column="5" selection-end-line="6" selection-end-column="5" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/users/edit.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.8759542">
<caret line="27" column="6" selection-start-line="27" selection-start-column="6" selection-end-line="27" selection-end-column="6" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/public/500.html">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.259542">
@ -783,13 +724,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/assets/stylesheets/custom.css.scss">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-10.461538">
<caret line="16" column="49" selection-start-line="16" selection-start-column="49" selection-end-line="16" selection-end-column="49" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/db/migrate/20180206065942_add_activation_to_users.rb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
@ -843,14 +777,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/sessions_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="6" column="20" selection-start-line="6" selection-start-column="20" selection-end-line="6" selection-end-column="20" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/helpers/sessions_helper.rb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
@ -867,22 +793,6 @@
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/.rvm/gems/ruby-2.3.0/gems/actionview-4.2.8/lib/action_view/helpers/asset_tag_helper.rb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="206" column="19" selection-start-line="206" selection-start-column="16" selection-end-line="206" selection-end-column="19" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/config/routes.rb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="3" column="31" selection-start-line="3" selection-start-column="23" selection-end-line="3" selection-end-column="31" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/assets/images/logo.png">
<provider selected="true" editor-type-id="images">
<state />
@ -906,11 +816,6 @@
<state />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/assets/images/welcome/wel_1.jpg">
<provider selected="true" editor-type-id="images">
<state />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/.gitignore">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
@ -919,16 +824,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/layouts/_header.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-0.19318181">
<caret line="12" column="35" selection-start-line="12" selection-start-column="35" selection-end-line="12" selection-end-column="35" />
<folding>
<element signature="n#style#0;n#img#0;n#li#0;n#ul#0;n#div#0;n#div#0;n#header#0;n#!!top" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/welcomes/home.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-11.769231">
@ -985,22 +880,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Gemfile">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-3.7777777">
<caret line="8" column="39" selection-start-line="8" selection-start-column="39" selection-end-line="8" selection-end-column="39" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/users_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="13" column="0" selection-start-line="13" selection-start-column="0" selection-end-line="13" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/db/seeds.rb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
@ -1025,10 +904,34 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/questions_controller.rb">
<entry file="file://$PROJECT_DIR$/db/migrate/20180226144108_create_questions.rb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="10" column="25" selection-start-line="10" selection-start-column="25" selection-end-line="10" selection-end-column="25" />
<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://$PROJECT_DIR$/Gemfile">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-4.25">
<caret line="9" column="22" selection-start-line="9" selection-start-column="22" selection-end-line="9" selection-end-column="22" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/config/routes.rb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="3" column="20" selection-start-line="3" selection-start-column="20" selection-end-line="3" selection-end-column="20" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/config/locales/en.yml">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.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>
@ -1036,7 +939,62 @@
<entry file="file://$PROJECT_DIR$/app/models/user.rb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="1" column="17" selection-start-line="1" selection-start-column="17" selection-end-line="1" selection-end-column="17" />
<caret line="30" column="30" selection-start-line="30" selection-start-column="30" selection-end-line="30" selection-end-column="30" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/sessions/new.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-5.209677">
<caret line="19" column="91" selection-start-line="19" selection-start-column="91" selection-end-line="19" selection-end-column="91" />
<folding>
<element signature="n#style#0;n#div#1;n#div#0;n#div#0;n#div#0;n#!!top" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/application_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="5" column="0" selection-start-line="5" selection-start-column="0" selection-end-line="5" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/assets/images/welcome/wel_1.jpg">
<provider selected="true" editor-type-id="images">
<state />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/account_activations_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.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/questions/edit.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-1.3076923">
<caret line="2" column="14" selection-start-line="2" selection-start-column="14" selection-end-line="2" selection-end-column="14" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/questions/_form.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-0.0">
<caret line="0" column="9" selection-start-line="0" selection-start-column="9" selection-end-line="0" selection-end-column="9" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/questions/new.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.06390978">
<caret line="2" column="14" selection-start-line="2" selection-start-column="14" selection-end-line="2" selection-end-column="14" />
<folding />
</state>
</provider>
@ -1049,10 +1007,90 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/db/migrate/20180226144108_create_questions.rb">
<entry file="file://$USER_HOME$/.rvm/gems/ruby-2.3.0/gems/actionview-4.2.8/lib/action_view/helpers/asset_tag_helper.rb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.39005736">
<caret line="12" column="0" selection-start-line="12" selection-start-column="0" selection-end-line="12" selection-end-column="0" />
<state vertical-scroll-proportion="0.516129">
<caret line="201" column="49" selection-start-line="201" selection-start-column="39" selection-end-line="201" selection-end-column="49" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/questions/index.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-8.692307">
<caret line="19" column="34" selection-start-line="19" selection-start-column="34" selection-end-line="19" selection-end-column="34" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/assets/stylesheets/application.css.scss">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.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/assets/stylesheets/custom.css.scss">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="82.38461">
<caret line="3" column="7" selection-start-line="3" selection-start-column="1" selection-end-line="3" selection-end-column="7" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/assets/stylesheets/public.scss">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-1.2903225">
<caret line="137" column="20" selection-start-line="137" selection-start-column="20" selection-end-line="137" selection-end-column="20" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/sessions_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="11" column="32" selection-start-line="11" selection-start-column="28" selection-end-line="11" selection-end-column="32" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/layouts/_header.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-3.2692308">
<caret line="5" column="43" selection-start-line="5" selection-start-column="43" selection-end-line="5" selection-end-column="43" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/questions_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="6" column="9" selection-start-line="6" selection-start-column="9" selection-end-line="6" selection-end-column="9" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/jobs_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="6" column="9" selection-start-line="6" selection-start-column="9" selection-end-line="6" selection-end-column="9" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/users_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="7" column="9" selection-start-line="7" selection-start-column="9" selection-end-line="7" selection-end-column="9" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/helpers/application_helper.rb">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.57347673">
<caret line="22" column="6" selection-start-line="22" selection-start-column="6" selection-end-line="22" selection-end-column="6" />
<folding />
</state>
</provider>

View File

@ -5,6 +5,9 @@ source 'https://gems.ruby-china.org'
gem 'rails', '4.2.8'
gem 'bcrypt', '3.1.7'
gem 'faker', '1.4.2'
gem 'carrierwave', '0.10.0'
gem 'mini_magick', '3.8.0'
gem 'fog', '~> 1.36.0'
gem 'will_paginate', '3.0.7'
gem 'bootstrap-will_paginate', '0.0.10'
# gem 'bootstrap-sass', '~> 3.3.6'

View File

@ -1,6 +1,7 @@
GEM
remote: https://gems.ruby-china.org/
specs:
CFPropertyList (2.3.6)
actionmailer (4.2.8)
actionpack (= 4.2.8)
actionview (= 4.2.8)
@ -42,6 +43,11 @@ GEM
will_paginate
builder (3.2.3)
byebug (9.1.0)
carrierwave (0.10.0)
activemodel (>= 3.2.0)
activesupport (>= 3.2.0)
json (>= 1.7)
mime-types (>= 1.16)
coderay (1.1.2)
coffee-rails (4.1.1)
coffee-script (>= 2.2.0)
@ -53,10 +59,118 @@ GEM
concurrent-ruby (1.0.5)
crass (1.0.3)
erubis (2.7.0)
excon (0.60.0)
execjs (2.7.0)
faker (1.4.2)
i18n (~> 0.5)
ffi (1.9.18)
fission (0.5.0)
CFPropertyList (~> 2.2)
fog (1.36.0)
fog-aliyun (>= 0.1.0)
fog-atmos
fog-aws (>= 0.6.0)
fog-brightbox (~> 0.4)
fog-core (~> 1.32)
fog-dynect (~> 0.0.2)
fog-ecloud (~> 0.1)
fog-google (<= 0.1.0)
fog-json
fog-local
fog-powerdns (>= 0.1.1)
fog-profitbricks
fog-radosgw (>= 0.0.2)
fog-riakcs
fog-sakuracloud (>= 0.0.4)
fog-serverlove
fog-softlayer
fog-storm_on_demand
fog-terremark
fog-vmfusion
fog-voxel
fog-xenserver
fog-xml (~> 0.1.1)
ipaddress (~> 0.5)
nokogiri (~> 1.5, >= 1.5.11)
fog-aliyun (0.2.0)
fog-core (~> 1.27)
fog-json (~> 1.0)
ipaddress (~> 0.8)
xml-simple (~> 1.1)
fog-atmos (0.1.0)
fog-core
fog-xml
fog-aws (2.0.0)
fog-core (~> 1.38)
fog-json (~> 1.0)
fog-xml (~> 0.1)
ipaddress (~> 0.8)
fog-brightbox (0.14.0)
fog-core (~> 1.22)
fog-json
inflecto (~> 0.0.2)
fog-core (1.45.0)
builder
excon (~> 0.58)
formatador (~> 0.2)
fog-dynect (0.0.3)
fog-core
fog-json
fog-xml
fog-ecloud (0.3.0)
fog-core
fog-xml
fog-google (0.1.0)
fog-core
fog-json
fog-xml
fog-json (1.0.2)
fog-core (~> 1.0)
multi_json (~> 1.10)
fog-local (0.5.0)
fog-core (>= 1.27, < 3.0)
fog-powerdns (0.1.1)
fog-core (~> 1.27)
fog-json (~> 1.0)
fog-xml (~> 0.1)
fog-profitbricks (4.1.1)
fog-core (~> 1.42)
fog-json (~> 1.0)
fog-radosgw (0.0.5)
fog-core (>= 1.21.0)
fog-json
fog-xml (>= 0.0.1)
fog-riakcs (0.1.0)
fog-core
fog-json
fog-xml
fog-sakuracloud (1.7.5)
fog-core
fog-json
fog-serverlove (0.1.2)
fog-core
fog-json
fog-softlayer (1.1.4)
fog-core
fog-json
fog-storm_on_demand (0.1.1)
fog-core
fog-json
fog-terremark (0.1.0)
fog-core
fog-xml
fog-vmfusion (0.1.0)
fission
fog-core
fog-voxel (0.1.0)
fog-core
fog-xml
fog-xenserver (0.3.0)
fog-core
fog-xml
fog-xml (0.1.3)
fog-core
nokogiri (>= 1.5.11, < 2.0.0)
formatador (0.2.5)
globalid (0.4.1)
activesupport (>= 4.2.0)
@ -74,6 +188,8 @@ GEM
minitest (>= 3.0)
i18n (0.9.3)
concurrent-ruby (~> 1.0)
inflecto (0.0.2)
ipaddress (0.8.3)
jbuilder (2.7.0)
activesupport (>= 4.2.0)
multi_json (>= 1.2)
@ -94,9 +210,14 @@ GEM
mail (2.7.0)
mini_mime (>= 0.1.1)
method_source (0.9.0)
mime-types (3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mini_backtrace (0.1.3)
minitest (> 1.2.0)
rails (>= 2.3.3)
mini_magick (3.8.0)
subexec (~> 0.2.1)
mini_mime (1.0.0)
mini_portile2 (2.3.0)
minitest (5.11.1)
@ -182,10 +303,7 @@ GEM
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
strong_parameters (0.1.4)
actionpack (>= 3.2.0)
activemodel (>= 3.2.0)
railties (>= 3.2.0)
subexec (0.2.3)
therubyracer (0.12.3)
libv8 (~> 3.16.14.15)
ref
@ -200,6 +318,7 @@ GEM
uglifier (4.1.4)
execjs (>= 0.3.0, < 3)
will_paginate (3.0.7)
xml-simple (1.1.5)
PLATFORMS
ruby
@ -208,12 +327,15 @@ DEPENDENCIES
bcrypt (= 3.1.7)
bootstrap-will_paginate (= 0.0.10)
byebug
carrierwave (= 0.10.0)
coffee-rails (~> 4.1.0)
faker (= 1.4.2)
fog (~> 1.36.0)
guard-minitest (= 2.3.1)
jbuilder (~> 2.0)
jquery-rails
mini_backtrace (= 0.1.3)
mini_magick (= 3.8.0)
minitest-reporters (= 1.0.5)
mysql2 (>= 0.3.13, < 0.5)
rails (= 4.2.8)
@ -223,7 +345,6 @@ DEPENDENCIES
sass-rails (~> 5.0)
sdoc (~> 0.4.0)
spring
strong_parameters
therubyracer
turbolinks
uglifier (>= 1.3.0)

BIN
app/assets/images/bg1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

View File

@ -218,3 +218,36 @@ $state-danger-text: #eaeaea;
width: auto;
margin-left: 0;
}
/*底部导航*/
.footer-bg{background:#222;padding:35px 0;}
.footer-widgets{
width:100%;
}
// 底部始终处于最下端
#footer {clear: both; font-size: 0.9em; color: #aaa; background:#fff;position: absolute;bottom: 0px;width: 100%}
input[type=checkbox], input[type=radio]{width: 15px;height: 15px;margin: 0px}
/***** 非公共样式 *****/
/***** 登陆注册 *****/
.login_input{outline: none;width: 295px;height: 45px;border-radius: 5px;padding-left: 5px;line-height: 45px;font-size: 14px;color: #666;}
.new_login_weixin {border-bottom: 1px solid #ddd;width: 500px;margin:auto}
.txt_center{text-align: center}.txt_left{text-align: left}
#pref_hide_mail{width: 18px;height: 18px;display: inline-block;margin-left: 10px;margin-top: 10px}
#regist{width:295px;outline: none;height: 45px;border-radius: 5px;line-height: 45px;font-size: 14px;color: #666;margin-left:30%!important; color: white;border-radius:3px;background-color: #337ab7;color: white;padding: 0}
.login_bg{position: relative;width: 100%;height: 100%; background: url('/assets/bg1.jpg') no-repeat 100% !important;vertical-align: top}
.update_password input{width: 30%}
/***** 登陆注册End *****/
.wrap-login{position: absolute;width: 100%;bottom: 0px;top:-60px}
#login-form { width:380px; box-sizing: border-box;}
#login-form label {display:block; margin-bottom:5px;}
#login-form input[type=text], #login-form input[type=password] {border:1px solid #ccc; border-radius:3px; display:block; width:100%; box-sizing: border-box;}
#login-form input[type=password]{margin: 0px;}
#login-form label {font-weight:bold;}
#login-form label[for=autologin] {font-weight:normal;}
#login-form a.lost_password {float:right; font-weight:normal;}
#login-form input#login-submit {text-decoration: none !important;width:100%;display:block;line-height: 33px;background: #337ab7;color: #fff !important;font-size: 14px;border-radius: 5px;border: none;text-align: center;cursor: pointer;vertical-align: middle; box-sizing: border-box;}

View File

@ -135,7 +135,7 @@ a:hover.link-color-grey03{color:#3498db!important;}
.font-30{ font-size: 30px!important;}
/*通用内外边距*/
.mt0{margin-top: 0px!important;}.mb0{margin-bottom: 0px!important;}.ml0{margin-left: 0px!important;}.mr0{margin-left: 0px!important;}
.mt-10{ margin-top:-10px;}.mt2{ margin-top:2px;}.mt3{ margin-top:3px;}.mt4{ margin-top:4px;}.mt5{ margin-top:5px;}.mt6{ margin-top:6px;}.mt7{ margin-top:7px;}.mt8{ margin-top:8px;}.mt10{ margin-top:10px;}.mt12{ margin-top:12px;}.mt13{ margin-top:13px;}.mt15{ margin-top:15px;}.mt20{ margin-top:20px;}.mt25{ margin-top:25px;}.mt30{ margin-top:30px;}.mt40{ margin-top:40px;}.mt50{ margin-top:50px;}.mt60{ margin-top:60px;}.mt70{margin-top: 70px}.mt80{ margin-top:80px;}.mt90{ margin-top:90px;}.mt95{ margin-top:95px;}.mt100{ margin-top:100px;}.mt130{ margin-top:130px;}
.mt-5{ margin-top:-5px;}.mt-10{ margin-top:-10px;}.mt2{ margin-top:2px;}.mt3{ margin-top:3px;}.mt4{ margin-top:4px;}.mt5{ margin-top:5px;}.mt6{ margin-top:6px;}.mt7{ margin-top:7px;}.mt8{ margin-top:8px;}.mt10{ margin-top:10px;}.mt12{ margin-top:12px;}.mt13{ margin-top:13px;}.mt15{ margin-top:15px;}.mt20{ margin-top:20px;}.mt25{ margin-top:25px;}.mt30{ margin-top:30px;}.mt40{ margin-top:40px;}.mt50{ margin-top:50px;}.mt60{ margin-top:60px;}.mt70{margin-top: 70px}.mt80{ margin-top:80px;}.mt90{ margin-top:90px;}.mt95{ margin-top:95px;}.mt100{ margin-top:100px;}.mt130{ margin-top:130px;}
.mb3{ margin-bottom: 3px;}.mb5{ margin-bottom: 5px;}.mb10{ margin-bottom: 10px;}.mb15{ margin-bottom: 15px;}.mb20{ margin-bottom: 20px;}.mb25{ margin-bottom: 25px;}.mb30{ margin-bottom: 30px;}.mb40{ margin-bottom: 40px;}.mb50{ margin-bottom: 50px;}.mb60{ margin-bottom: 60px;}.mb110{ margin-bottom: 110px;}
.ml-3{ margin-left: -3px;}.ml0{margin-left: 0}.ml5{ margin-left: 5px;}.ml6{ margin-left: 6px;}.ml10{ margin-left: 10px;}.ml15{ margin-left: 15px;}.ml18{ margin-left: 18px;}.ml20{ margin-left: 20px;}.ml25{ margin-left: 25px;}.ml30{ margin-left: 30px;}.ml33{ margin-left: 33px;}.ml35{ margin-left:35px;}.ml40{margin-left:40px;}.ml42{margin-left:42px;}.ml50{ margin-left: 50px;}.ml55{ margin-left: 55px;}.ml75{ margin-left: 75px;}.ml80{ margin-left: 80px}.ml95{ margin-left: 95px;}.ml115{margin-left: 115px}.ml230{ margin-left: 230px;}
.mr3{margin-right: 3px}.mr4{margin-right: 4px}.mr5{ margin-right: 5px;}.mr10{ margin-right: 10px;}.mr15{ margin-right: 15px;}.mr18{ margin-right: 18px;}.mr20{ margin-right: 20px;}.mr25{ margin-right: 25px;}.mr30{ margin-right:30px;}.mr40{margin-right:40px;}.mr50{ margin-right: 50px;}.mr60{ margin-right:60px;}.mr350{ margin-right:350px;}.pt5{ padding-top:5px;}.pt10{ padding-top:10px;}.pt15{ padding-top:15px;}.pt20{ padding-top:20px;}.pt30{ padding-top:30px;}.pt40{ padding-top:40px;}

View File

@ -0,0 +1,75 @@
class JobsController < ApplicationController
before_action :set_job, only: [:show, :edit, :update, :destroy]
# GET /jobs
# GET /jobs.json
def index
@menu_type = 2
@jobs = Job.all
end
# GET /jobs/1
# GET /jobs/1.json
def show
end
# GET /jobs/new
def new
@job = Job.new
end
# GET /jobs/1/edit
def edit
end
# POST /jobs
# POST /jobs.json
def create
@job = Job.new(job_params)
respond_to do |format|
if @job.save
format.html { redirect_to @job, notice: 'Job was successfully created.' }
format.json { render :show, status: :created, location: @job }
else
format.html { render :new }
format.json { render json: @job.errors, status: :unprocessable_entity }
end
end
end
# PATCH/PUT /jobs/1
# PATCH/PUT /jobs/1.json
def update
respond_to do |format|
if @job.update(job_params)
format.html { redirect_to @job, notice: 'Job was successfully updated.' }
format.json { render :show, status: :ok, location: @job }
else
format.html { render :edit }
format.json { render json: @job.errors, status: :unprocessable_entity }
end
end
end
# DELETE /jobs/1
# DELETE /jobs/1.json
def destroy
@job.destroy
respond_to do |format|
format.html { redirect_to jobs_url, notice: 'Job was successfully destroyed.' }
format.json { head :no_content }
end
end
private
# Use callbacks to share common setup or constraints between actions.
def set_job
@job = Job.find(params[:id])
end
# Never trust parameters from the scary internet, only allow the white list through.
def job_params
params.require(:job).permit(:name, :content, :user_id)
end
end

View File

@ -4,6 +4,7 @@ class QuestionsController < ApplicationController
# GET /questions
# GET /questions.json
def index
@menu_type = 1
@questions = Question.all
end
@ -24,7 +25,7 @@ class QuestionsController < ApplicationController
# POST /questions
# POST /questions.json
def create
@question = Question.new(question_params)
@question = current_user.questions.build(question_params)
respond_to do |format|
if @question.save
@ -69,6 +70,6 @@ class QuestionsController < ApplicationController
# Never trust parameters from the scary internet, only allow the white list through.
def question_params
params.require(:question).permit(:name, :content, :user_id)
params.require(:question).permit(:name, :content)
end
end

View File

@ -5,6 +5,7 @@ class UsersController < ApplicationController
before_action :admin_user, only: :destroy
def index
@menu_type = 3
@users = User.paginate(page: params[:page])
end
@ -50,7 +51,7 @@ class UsersController < ApplicationController
private
def user_params
require(:user).permit(:name, :email, :password,
params.require(:user).permit(:name, :email, :password,
:password_confirmation)
end

View File

@ -20,4 +20,11 @@ module ApplicationHelper
end
end
# 控制menu点击后整个页面刷新时背景色
def menu_active(type, menu)
if type == menu
'active'
end
end
end

View File

@ -0,0 +1,2 @@
module JobsHelper
end

3
app/models/job.rb Normal file
View File

@ -0,0 +1,3 @@
class Job < ActiveRecord::Base
belongs_to :user
end

View File

@ -0,0 +1,51 @@
# encoding: utf-8
class PictureUploader < CarrierWave::Uploader::Base
# Include RMagick or MiniMagick support:
# include CarrierWave::RMagick
# include CarrierWave::MiniMagick
# Choose what kind of storage to use for this uploader:
storage :file
# storage :fog
# Override the directory where uploaded files will be stored.
# This is a sensible default for uploaders that are meant to be mounted:
def store_dir
"uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
end
# Provide a default URL as a default if there hasn't been a file uploaded:
# def default_url
# # For Rails 3.1+ asset pipeline compatibility:
# # ActionController::Base.helpers.asset_path("fallback/" + [version_name, "default.png"].compact.join('_'))
#
# "/images/fallback/" + [version_name, "default.png"].compact.join('_')
# end
# Process files as they are uploaded:
# process :scale => [200, 300]
#
# def scale(width, height)
# # do something
# end
# Create different versions of your uploaded files:
# version :thumb do
# process :resize_to_fit => [50, 50]
# end
# Add a white list of extensions which are allowed to be uploaded.
# For images you might use something like this:
# def extension_white_list
# %w(jpg jpeg gif png)
# end
# Override the filename of the uploaded files:
# Avoid using model.id or version_name here, see uploader/store.rb for details.
# def filename
# "something.jpg" if original_filename
# end
end

View File

@ -0,0 +1,29 @@
<%= form_for(@job) do |f| %>
<% if @job.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@job.errors.count, "error") %> prohibited this job from being saved:</h2>
<ul>
<% @job.errors.full_messages.each do |message| %>
<li><%= message %></li>
<% end %>
</ul>
</div>
<% end %>
<div class="field">
<%= f.label :name %><br>
<%= f.text_field :name %>
</div>
<div class="field">
<%= f.label :content %><br>
<%= f.text_area :content %>
</div>
<div class="field">
<%= f.label :user_id %><br>
<%= f.text_field :user_id %>
</div>
<div class="actions">
<%= f.submit %>
</div>
<% end %>

View File

@ -0,0 +1,2 @@
json.extract! job, :id, :name, :content, :user_id, :created_at, :updated_at
json.url job_url(job, format: :json)

View File

@ -0,0 +1,6 @@
<h1>Editing Job</h1>
<%= render 'form' %>
<%= link_to 'Show', @job %> |
<%= link_to 'Back', jobs_path %>

View File

@ -0,0 +1,31 @@
<p id="notice"><%= notice %></p>
<h1>Listing Jobs</h1>
<table>
<thead>
<tr>
<th>Name</th>
<th>Content</th>
<th>User</th>
<th colspan="3"></th>
</tr>
</thead>
<tbody>
<% @jobs.each do |job| %>
<tr>
<td><%= job.name %></td>
<td><%= job.content %></td>
<td><%= job.user %></td>
<td><%= link_to 'Show', job %></td>
<td><%= link_to 'Edit', edit_job_path(job) %></td>
<td><%= link_to 'Destroy', job, method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</tbody>
</table>
<br>
<%= link_to 'New Job', new_job_path %>

View File

@ -0,0 +1 @@
json.array! @jobs, partial: 'jobs/job', as: :job

View File

@ -0,0 +1,5 @@
<h1>New Job</h1>
<%= render 'form' %>
<%= link_to 'Back', jobs_path %>

View File

@ -0,0 +1,19 @@
<p id="notice"><%= notice %></p>
<p>
<strong>Name:</strong>
<%= @job.name %>
</p>
<p>
<strong>Content:</strong>
<%= @job.content %>
</p>
<p>
<strong>User:</strong>
<%= @job.user %>
</p>
<%= link_to 'Edit', edit_job_path(@job) %> |
<%= link_to 'Back', jobs_path %>

View File

@ -0,0 +1 @@
json.partial! "jobs/job", job: @job

View File

@ -2,10 +2,10 @@
<div class="container">
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li id="logo-img"><img src="<%= image_path("logo.png") %>" width="40" height="40" class="mt10 mr20" style="border-radius: 6px"/></li>
<li class="active"><a href="<%= users_path %>">博客</a></li>
<li><a href="#">问答</a></li>
<li><a href="#contact">活动</a></li>
<li id="logo-img"><%= link_to image_tag(image_path("logo.png"), size: "40", style: "border-radius: 6px"), home_path, class: "mt-5" %></li>
<li class="<%= menu_active(1, @menu_type) %>"><%= link_to "问答", questions_path %></li>
<li class="<%= menu_active(2, @menu_type) %>"><%= link_to "招聘", jobs_path %></li>
<li class="<%= menu_active(3, @menu_type) %>"><%= link_to "用户", users_path %></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a>
<ul class="dropdown-menu">

View File

@ -19,10 +19,7 @@
<%= f.label :content %><br>
<%= f.text_area :content %>
</div>
<div class="field">
<%= f.label :user_id %><br>
<%= f.text_field :user_id %>
</div>
<div class="actions">
<%= f.submit %>
</div>

View File

@ -17,7 +17,7 @@
<tr>
<td><%= question.name %></td>
<td><%= question.content %></td>
<td><%= question.user %></td>
<td><%= question.user.name %></td>
<td><%= link_to 'Show', question %></td>
<td><%= link_to 'Edit', edit_question_path(question) %></td>
<td><%= link_to 'Destroy', question, method: :delete, data: { confirm: 'Are you sure?' } %></td>

View File

@ -1,25 +1,46 @@
<h1>Sessions#new</h1>
<p>Find me in app/views/sessions/new.html.erb</p>
<h1>Log in</h1>
<div id="wrap" class="wrap-login">
<div class="login_bg clearfix">
<div id="login-form" style="position:absolute;margin-left: -190px;left: 50%;margin-top: -250px;top: 50%;background: white;border-radius: 8%" class="pt20 pb40 pl50 pr50">
<div class="clearfix pt10 pb20" id="new_login_weixin" >
<h3 class="txt_center">登录</h3>
</div>
<p class="fr font-12 mt10">没有账号?
<%= link_to "注册" ,signup_path %></a>
</p>
<div class="row">
<div class="col-md-6 col-md-offset-3">
<%= form_for(:session, url: login_path) do |f| %>
<%#= form_tag(signin_path, onsubmit: 'return keepAnchorOnSignIn(this);') do %>
<label for="username" class="fl mt10">登录</label>
<%= f.email_field :email, class: 'login_input', tabindex: '1', placeholder: "请输入用户邮箱" %>
<%#= text_field_tag 'username', params[:username], :tabindex => '1',:placeholder=>"请输入用户名",:class =>"login_input mb10"%>
<%= f.label :email %>
<%= f.email_field :email, class: 'form-control' %>
<%= f.label :password %>
<%= f.password_field :password, class: 'form-control' %>
<label for="password">密码
<%= link_to "忘记密码", login_path, :class => "lost_password" %>
</label>
<%= f.password_field :password, class: 'login_input', tabindex: '2', placeholder: "请输入密码" %>
<%#= password_field_tag 'password', nil, :tabindex => '2' ,:placeholder=>"请输入密码",:class =>"login_input" %>
<%= f.label :remember_me, class: "checkbox inline" do %>
<%= f.check_box :remember_me %>
<span>Remember me on this computer</span>
<span>保持登录</span>
<% end %>
<div style="height: 25px;color: red" class="mb10">
<%= flash['error'] %>
</div>
<%= f.submit "Log in", class: "btn btn-primary" %>
<!--登录-->
<%= f.submit "Log in", class: "btn btn-primary", tabindex: '5' %>
<!--<input type="submit" name="login" value="<%#=l(:button_login)%>" tabindex="5" id="login-submit"/>-->
<% end %>
<p>New user? <%= link_to "Sign up now!", signup_path %></p>
</div>
<% if params[:username].present? %>
<%= javascript_tag "$('#password').focus();" %>
<% else %>
<%= javascript_tag "$('#username').focus();" %>
<% end %>
</div>
</div>

View File

@ -1,4 +1,5 @@
Rails.application.routes.draw do
resources :jobs
resources :questions
root 'welcomes#home', :as => "home"
get 'sessions/new'

View File

@ -0,0 +1,11 @@
class CreateJobs < ActiveRecord::Migration
def change
create_table :jobs do |t|
t.string :name
t.text :content
t.references :user, index: true, foreign_key: true
t.timestamps null: false
end
end
end

View File

@ -11,7 +11,17 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20180226144108) do
ActiveRecord::Schema.define(version: 20180228104924) do
create_table "jobs", force: :cascade do |t|
t.string "name", limit: 255
t.text "content", limit: 65535
t.integer "user_id", limit: 4
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
add_index "jobs", ["user_id"], name: "index_jobs_on_user_id", using: :btree
create_table "questions", force: :cascade do |t|
t.string "name", limit: 255
@ -38,5 +48,6 @@ ActiveRecord::Schema.define(version: 20180226144108) do
add_index "users", ["email", "name"], name: "index_users_on_email_and_name", unique: true, using: :btree
add_foreign_key "jobs", "users"
add_foreign_key "questions", "users"
end

View File

@ -0,0 +1,49 @@
require 'test_helper'
class JobsControllerTest < ActionController::TestCase
setup do
@job = jobs(:one)
end
test "should get index" do
get :index
assert_response :success
assert_not_nil assigns(:jobs)
end
test "should get new" do
get :new
assert_response :success
end
test "should create job" do
assert_difference('Job.count') do
post :create, job: { content: @job.content, name: @job.name, user_id: @job.user_id }
end
assert_redirected_to job_path(assigns(:job))
end
test "should show job" do
get :show, id: @job
assert_response :success
end
test "should get edit" do
get :edit, id: @job
assert_response :success
end
test "should update job" do
patch :update, id: @job, job: { content: @job.content, name: @job.name, user_id: @job.user_id }
assert_redirected_to job_path(assigns(:job))
end
test "should destroy job" do
assert_difference('Job.count', -1) do
delete :destroy, id: @job
end
assert_redirected_to jobs_path
end
end

11
test/fixtures/jobs.yml vendored Normal file
View File

@ -0,0 +1,11 @@
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
name: MyString
content: MyText
user_id:
two:
name: MyString
content: MyText
user_id:

7
test/models/job_test.rb Normal file
View File

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