Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
01d041af
R
rails
项目概览
张重言
/
rails
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rails
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
01d041af
编写于
1月 19, 2012
作者:
V
Vijay Dev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update the getting_started guide code [ci skip]
上级
0056a751
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
57 addition
and
24 deletion
+57
-24
railties/guides/code/getting_started/Gemfile
railties/guides/code/getting_started/Gemfile
+17
-6
railties/guides/code/getting_started/app/assets/javascripts/application.js
...ode/getting_started/app/assets/javascripts/application.js
+9
-3
railties/guides/code/getting_started/app/assets/stylesheets/application.css
...de/getting_started/app/assets/stylesheets/application.css
+11
-5
railties/guides/code/getting_started/app/views/layouts/application.html.erb
...de/getting_started/app/views/layouts/application.html.erb
+1
-1
railties/guides/code/getting_started/config/application.rb
railties/guides/code/getting_started/config/application.rb
+7
-1
railties/guides/code/getting_started/config/environments/test.rb
...s/guides/code/getting_started/config/environments/test.rb
+3
-3
railties/guides/code/getting_started/config/initializers/inflections.rb
...s/code/getting_started/config/initializers/inflections.rb
+5
-0
railties/guides/code/getting_started/config/routes.rb
railties/guides/code/getting_started/config/routes.rb
+4
-4
railties/guides/code/getting_started/public/500.html
railties/guides/code/getting_started/public/500.html
+0
-1
未找到文件。
railties/guides/code/getting_started/Gemfile
浏览文件 @
01d041af
source
'http://rubygems.org'
source
'https://rubygems.org'
gem
'rails'
,
'3.2.0'
gem
'rails'
,
'3.1.0'
# Bundle edge Rails instead:
# gem 'rails',
:git => 'git://github.com/rails/rails.git'
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem
'sqlite3'
...
...
@@ -10,13 +11,23 @@ gem 'sqlite3'
# Gems used only for assets and not required
# in production environments by default.
group
:assets
do
gem
'sass-rails'
,
" ~> 3.1.0"
gem
'coffee-rails'
,
"~> 3.1.0"
gem
'uglifier'
gem
'sass-rails'
,
'~> 3.2.3'
gem
'coffee-rails'
,
'~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer'
gem
'uglifier'
,
'>= 1.0.3'
end
gem
'jquery-rails'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the web server
# gem 'unicorn'
...
...
railties/guides/code/getting_started/app/assets/javascripts/application.js
浏览文件 @
01d041af
// This is a manifest file that'll be compiled into including all the files listed below.
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
// be included in the compiled file accessible from http://example.com/assets/application.js
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
// GO AFTER THE REQUIRES BELOW.
//
//= require jquery
//= require jquery_ujs
//= require_tree .
railties/guides/code/getting_started/app/assets/stylesheets/application.css
浏览文件 @
01d041af
/*
* This is a manifest file that'll automatically include all the stylesheets available in this directory
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
* the top of the compiled file, but it's generally better to create a new file per style scope.
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the top of the
* compiled file, but it's generally better to create a new file per style scope.
*
*= require_self
*= require_tree .
*/
\ No newline at end of file
*= require_tree .
*/
railties/guides/code/getting_started/app/views/layouts/application.html.erb
浏览文件 @
01d041af
...
...
@@ -6,7 +6,7 @@
<%=
javascript_include_tag
"application"
%>
<%=
csrf_meta_tags
%>
</head>
<body
style=
"background: #EEEEEE;"
>
<body>
<%=
yield
%>
...
...
railties/guides/code/getting_started/config/application.rb
浏览文件 @
01d041af
...
...
@@ -4,7 +4,7 @@
if
defined?
(
Bundler
)
# If you precompile assets before deploying to production, use this line
Bundler
.
require
*
Rails
.
groups
(
:assets
=>
%w(development test
)
)
Bundler
.
require
(
*
Rails
.
groups
(
:assets
=>
%w(development test)
))
# If you want your assets lazily compiled in production, use this line
# Bundler.require(:default, :assets, Rails.env)
end
...
...
@@ -40,6 +40,12 @@ class Application < Rails::Application
# like if you have constraints or database-specific column types
# config.active_record.schema_format = :sql
# Enforce whitelist mode for mass assignment.
# This will create an empty whitelist of attributes available for mass-assignment for all models
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
# parameters by using an attr_accessible or attr_protected declaration.
# config.active_record.whitelist_attributes = true
# Enable the asset pipeline
config
.
assets
.
enabled
=
true
...
...
railties/guides/code/getting_started/config/environments/test.rb
浏览文件 @
01d041af
...
...
@@ -26,9 +26,9 @@
# ActionMailer::Base.deliveries array.
config
.
action_mailer
.
delivery_method
=
:test
# Raise exception on mass assignment protection for Active Record models
config
.
active_record
.
mass_assignment_sanitizer
=
:strict
# Print deprecation notices to the stderr
config
.
active_support
.
deprecation
=
:stderr
# Allow pass debug_assets=true as a query parameter to load pages with unpackaged assets
config
.
assets
.
allow_debugging
=
true
end
railties/guides/code/getting_started/config/initializers/inflections.rb
浏览文件 @
01d041af
...
...
@@ -8,3 +8,8 @@
# inflect.irregular 'person', 'people'
# inflect.uncountable %w( fish sheep )
# end
#
# These inflection rules are supported but not enabled by default:
# ActiveSupport::Inflector.inflections do |inflect|
# inflect.acronym 'RESTful'
# end
railties/guides/code/getting_started/config/routes.rb
浏览文件 @
01d041af
Blog
::
Application
.
routes
.
draw
do
resources
:posts
do
resources
:comments
end
resources
:posts
do
resources
:comments
end
get
"home/index"
...
...
@@ -60,5 +60,5 @@
# This is a legacy wild controller route that's not recommended for RESTful applications.
# Note: This route will make all actions in every controller accessible via GET requests.
# match ':controller(/:action(/:id
(.:format))
)'
# match ':controller(/:action(/:id
))(.:format
)'
end
railties/guides/code/getting_started/public/500.html
浏览文件 @
01d041af
...
...
@@ -20,7 +20,6 @@
<!-- This file lives in public/500.html -->
<div
class=
"dialog"
>
<h1>
We're sorry, but something went wrong.
</h1>
<p>
We've been notified about this issue and we'll take a look at it shortly.
</p>
</div>
</body>
</html>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录