class Amount::AmountController < ApplicationController
sudo?
#4 楼 @a307697028 rails4 里面使用 match 的话 必须指定 请求方式 post get。。。
阿里云 有拍云 绑定域名
["a", "b", "c", "d"].fetch(1)
#4 楼 @blueplanet 谢谢 这个是在 电脑内存小的情况下 可能有这个 问题 我的是 10G 内存 在监视器里看了一下 没有内存压缩
我这个假死 可能是因为 ssh 连接的原因 等 ssh 彻底断掉 就恢复了
#1 楼 @ZombieCoder 我知道原因了 是 使用了 ssh 的原因 一段时间 ssh 不操作 失去连接 时 就会卡一段时间 过一段时间 就好了
#zh-CN.yml
# Sample localization file for English. Add more files in this directory for other locales.
# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
"zh-CN":
Sign in: 登 陆
Remeber me: 记住我
Logout: 退出
Login: 登陆
Sign up: 注册
Password confirmation: 确认密码
Sign in with: 使用#{provder}账号登陆
Forgot your password?: 忘记密码?
New website: 添加网址收藏
submit: 确定
cancel: 取消
member: 会员
activerecord:
models:
user: 用户
user_website: 网址
attributes:
user:
username: 用户名
email: 邮箱
password: 密码
password_confirmation: 确认密码
user_website:
name: 网址名称
url: 网址url
user_category_id: 网址分类
is_public: 是否公开
errors:
models:
user:
attributes:
username:
blank: "用户名不能为空!"
devise:
sessions:
user:
signed_in: 登陆成功
signed_out: 退出成功
helpers:
submit:
create: "创建 %{model}"
update: "Confirm changes to %{model}"
#application.rb
require File.expand_path('../boot', __FILE__)
require 'rails/all'
if defined?(Bundler)
# If you precompile assets before deploying to production, use this line
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
module Okeyso
class Application < Rails::Application
# 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.
# Custom directories with classes and modules you want to be autoloadable.
# config.autoload_paths += %W(#{config.root}/extras)
# Only load the plugins named here, in the order given (default is alphabetical).
# :all can be used as a placeholder for all plugins not explicitly named.
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
# Activate observers that should always be running.
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
# config.time_zone = 'Central Time (US & Canada)'
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de
# Configure the default encoding used in templates for Ruby 1.9.
config.encoding = "utf-8"
# Configure sensitive parameters which will be filtered from the log file.
config.filter_parameters += [:password]
# Enable escaping HTML in JSON.
config.active_support.escape_html_entities_in_json = true
# Use SQL instead of Active Record's schema dumper when creating the database.
# This is necessary if your schema can't be completely dumped by the schema dumper,
# 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
# Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0'
config.i18n.default_locale = "zh-CN"
end
end
maybe you need this http://ruby-china.org/topics/12269
strip_tags(content)
create 之后不需要 save 吧
性能 怎么样 和 原生的有多大差别
想买就买
我更新了 没有注意这个 忘了 中间有过要去重启一次 是会自动的 忘了之前是否先有次手动的了
objective-c 里 是%% - -!
希望功能跟页面一样 cool
搬砖 可以