how to pod install with rbenv-gemset on my local
$ initgemset
$ gem install cocoapods --install-dir [.gemsetname-gemsets]/
$ pod init
# after add Podfile
$ pod install [pod-name]
how to pod install with rbenv-gemset on my local
$ initgemset
$ gem install cocoapods --install-dir [.gemsetname-gemsets]/
$ pod init
# after add Podfile
$ pod install [pod-name]
HTTP_STATUS_CODES = { | |
100 => 'Continue', | |
101 => 'Switching Protocols', | |
102 => 'Processing', | |
200 => 'OK', | |
201 => 'Created', | |
202 => 'Accepted', | |
203 => 'Non-Authoritative Information', | |
204 => 'No Content', | |
205 => 'Reset Content', |
$ rails g model User
A summary of the Rails Guides on Routes, plus other tips.
The Rails router recognizes URLs and dispatches them to a controller's action. It can also generate paths and URLs, avoiding the need to hardcode strings in your views.
Examples
# Redirects /orders/report to orders#report.
get 'orders/report', to: 'orders#report'
# Houston | |
# https://github.com/nomad/houston | |
# Local and Remote Notification Programming Guide - The Feedback Service | |
# https://goo.gl/vEhEJE | |
require 'houston' | |
APN = Houston::Client.development | |
APN.certificate = File.read("development.pem") |
In Rails 4, your app's bin/ directory contains executables that are versioned like any other source code, rather than stubs that are generated on demand.
Here's how to upgrade:
bundle config --delete bin # Turn off Bundler's stub generator
rake rails:update:bin # Use the new Rails 4 executables
git add bin # Add bin/ to source control
# Created by https://www.gitignore.io/api/rails | |
### Rails ### | |
*.rbc | |
capybara-*.html | |
.rspec | |
/log | |
/tmp | |
/db/*.sqlite3 | |
/db/*.sqlite3-journal |
context 'check columns exsitence' do | |
it { is_expected.to respond_to :first_name } | |
it { is_expected.to respond_to :last_name } | |
it { is_expected.to respond_to :profilable } | |
it { is_expected.to respond_to :birth } | |
it { is_expected.to respond_to :gender } | |
it { is_expected.to respond_to :bio } | |
end | |
context 'model validation and associations' do |
ActiveAdmin.setup do |config| | |
# == Site Title | |
# | |
# Set the title that is displayed on the main layout | |
# for each of the active admin pages. | |
# | |
config.site_title = "Carrierwave Ios Rails Example" | |
# Set the link url for the title. For example, to take | |
# users to your main site. Defaults to no link. |
CarrierWave.configure do |config| | |
if Rails.env.test? || Rails.env.cucumber? | |
config.storage = :file | |
config.enable_processing = false | |
elsif ENV.key?('S3_KEY') | |
config.storage = :fog | |
# let's Carrierwave work on Heroku | |
config.cache_dir = Rails.root + '/tmp/uploads' |