The Brakeman gem will scan the Ruby code of a Rails application and alert you to common security vulnerabilities.
watch on iTunes follow on Twitter follow on Facebook subscribe to RSS feed Updated RailsCasts Status I had originally planned to return to RailsCasts on September 2, however I do not feel ready yet. I don't want to return until I am fully ready to avoid getting burnt out. It is hard to predict exactly when that will be, but in the meantime I have extended all subscriptions automatically by another
watch on iTunes follow on Twitter follow on Facebook subscribe to RSS feed RailsCasts Status You have probably noticed there has been a lack of new episodes lately. I have found it increasingly difficult to produce content, and I'm not entirely sure why. The best way I can describe it is that I feel paralized under the pressures of work. I have decided to take a Summer break to help me come up wit
git clone https://github.com/rails/rails.git cd rails bundle gem install bundler --pre bundle railties/bin/rails new ~/code/blog --edge -d postgresql mate ~/code/blog cd ~/code/blog rake db:create rails g scaffold article name content:text published_on:date tags properties:hstore rake db:migrate rails c Article.create! name: "Hello", tags: %w[ruby rails], properties: {author: "Ryan"} Article.first
Resources Faye Episode 136: jQuery Node.js Socket.io Cramp async_sinatra Goliath Full episode source code Update February 15, 2013: Thanks to Matthew Robertson for pointing out there is a security issue with this episode. The message auth_token needs to be cleared out in an outgoing callback to avoid leaking it to the client. See below for the code. Note: The Faye Rack server must be run in produc
callback = "http://localhost:3001/auth/todo/callback" app_id = "70b18783971c5405907241c1b45616a26c704dd6406cf1c6743ab61c4615eb00" secret = "1dbd541132ca2bdeb9fe83b41d24490b2be445c30fd1856e5914f6d343c4a71b" client = OAuth2::Client.new(app_id, secret, site: "http://localhost:3000/") client.auth_code.authorize_url(redirect_uri: callback) access = client.auth_code.get_token('b77df49142317a6a42ea12412d
<%= search_form_for @search, url: search_products_path, method: :post do |f| %> <%= f.condition_fields do |c| %> <%= render "condition_fields", f: c %> <% end %> <p><%= link_to_add_fields "Add Conditions", f, :condition %></p> <div class="field"> Sort: <%= f.sort_fields do |s| %> <%= s.sort_select %> <% end %> </div> <div class="actions"><%= f.submit "Search" %></div> <% end %> <table id="products
かつてエピソード219で、ActiveModelを用いて、データベーステーブルを裏に持たないながらデータ検証などのActiveRecordの機能を持ったモデルを作成しました。ActiveModelが優れているのは確かですが、このように直接利用するにはあまり使いやすいとは言えません。例えば入力データの検証機能を持ったモデルを作るとなるとシンプルなものでもかなりの量のコードを書くことになります。 class Message include ActiveModel::Validations include ActiveModel::Conversion extend ActiveModel::Naming attr_accessor :name, :email, :content validates_presence_of :name validates_format_of :email, :w
class Message include ActiveAttr::Model attribute :name attribute :email attribute :content attribute :priority # type: Integer, default: 0 attr_accessible :name, :email, :content validates_presence_of :name validates_format_of :email, :with => /^[-a-z0-9_+\.]+\@([-a-z0-9]+\.)+[a-z0-9]{2,4}$/i validates_length_of :content, :maximum => 500 end
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く