- 更新
2014-05-14
- バージョン
0.0.12
- 作者
@voluntas
- URL
とても詳しいまとめがありますので、ますはそちらを見ることをオススメします。
source "https://rubygems.org" | |
gem 'sprockets' | |
gem 'sprockets-sass' | |
gem 'sass' | |
gem 'compass' | |
gem 'bootstrap-sass' | |
gem 'handlebars_assets' | |
gem 'coffee-script' |
@interface UIImage(ImmediateLoad) | |
+ (UIImage*)imageImmediateLoadWithContentsOfFile:(NSString*)path; | |
@end | |
@implementation UIImage(ImmediateLoad) | |
+ (UIImage*)imageImmediateLoadWithContentsOfFile:(NSString*)path { | |
UIImage *image = [[UIImage alloc] initWithContentsOfFile:path]; |
2014-05-14
0.0.12
@voluntas
とても詳しいまとめがありますので、ますはそちらを見ることをオススメします。
namespace :deploy do | |
desc "Hot-reload God configuration for the Resque worker" | |
task :reload_god_config do | |
sudo "god stop resque" | |
sudo "god load #{File.join(deploy_to, 'current', 'config', 'resque-' + rails_env + '.god')}" | |
sudo "god start resque" | |
end | |
end | |
# append to the bottom: |
For a while, I have felt that the following is the correct way to improve the mass assignment problem without increasing the burden on new users. Now that the problem with the Rails default has been brought up again, it's a good time to revisit it.
When creating a form with form_for
, include a signed token including all of the fields that were created at form creation time. Only these fields are allowed.
To allow new known fields to be added via JS, we could add:
Some exercises from the Falsy Values workshops.
The good parts:
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
# app/controllers/users/password_controller.rb | |
class Users::PasswordsController < Devise::PasswordsController | |
def resource_params | |
params.require(:user).permit(:email, :password, :password_confirmation) | |
end | |
private :resource_params | |
end |