Sha256: 2763e80b7878bbfa098fd32194b1aea475241f04edb79f7032a03034d01b4b03
Contents?: true
Size: 476 Bytes
Versions: 8
Compression:
Stored size: 476 Bytes
Contents
class ArticlesController < ApplicationController def create if PaperTrail.active_record_protected_attributes? @article = Article.create params[:article] else @article = Article.create params.require(:article).permit! end head :ok end def current_user 'foobar'.tap do |string| # Invoking `id` returns the `object_id` value in Ruby18 by default string.class_eval { undef_method(:id) } if RUBY_VERSION < '1.9' end end end
Version data entries
8 entries across 8 versions & 1 rubygems