Change root password:
sudo passwd
Change user password:
passwd
Change root password:
sudo passwd
Change user password:
passwd
If the migration name is of the form "AddXXXToYYY" or "RemoveXXXFromYYY" and is followed by a list of column names and types then a migration containing the appropriate add_column and remove_column statements will be created.
$ rails g migration CreateUsers email:string:index
db/migrate/20161201203703_create_users.rb
class CreateUsers < ActiveRecord::Migration
> Admin::EstimatesController.instance_method(:update).source | |
" def update(options={}, &block) | |
object = resource | |
if update_resource(object, resource_params) | |
options[:location] ||= smart_resource_url | |
end | |
respond_with_dual_blocks(object, options, &block) | |
end" |
# This goes in config/locales/en.rb (*not* en.yml) | |
{ | |
:en => { | |
:time => { | |
:formats => { | |
:full => lambda { |time, _| "%H:%M | %A, #{time.day.ordinalize} %B %Y" } | |
} | |
} | |
} | |
} |
# config/initializers/clear_logs.rb | |
# This snippet simply clears your logs when they are too large. | |
# Large logs mean looooong search in TextMate. You know it :) | |
# Every time you run rails server or rails console it checks log sizes | |
# and clears the logs for you if necessary. | |
if Rails.env.development? | |
MAX_LOG_SIZE = 2.megabytes | |