Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

ActiveRecord::Base subclasses should pass ActiveModel::Lint. #2017

Merged
merged 1 commit into from

3 participants

@nertzy

This just adds a test case to make sure it does.

@Peeja

+1 (said the other author of the commit, in hopes of following the discussion).

@josevalim josevalim merged commit 6917c65 into rails:master
@franckverrot franckverrot referenced this pull request from a commit in franckverrot/rails
@mislav mislav avoid auto_linking already linked emails; more robust detection of li…
…nked URLs

References #1523  [#1862 state:resolved]  [#3591 state:resolved]

Add test that shows how link text can contain HTML if needed:
the trick is using block form in combination with `raw`.
Let link text be automatically HTML-escaped

[#2017 state:resolved]
17b4fd2
@nertzy

Something tells me that cesario didn't actually mention this pull request over 2 years ago. C'est la vie, GitHub.

@lsylvester lsylvester referenced this pull request from a commit in lsylvester/rails
@mislav mislav avoid auto_linking already linked emails; more robust detection of li…
…nked URLs

References #1523  [#1862 state:resolved]  [#3591 state:resolved]

Add test that shows how link text can contain HTML if needed:
the trick is using block form in combination with `raw`.
Let link text be automatically HTML-escaped

[#2017 state:resolved]
8f0b213
@lsylvester lsylvester referenced this pull request from a commit in lsylvester/rails
@mislav mislav avoid auto_linking already linked emails; more robust detection of li…
…nked URLs

References #1523  [#1862 state:resolved]  [#3591 state:resolved]

Add test that shows how link text can contain HTML if needed:
the trick is using block form in combination with `raw`.
Let link text be automatically HTML-escaped

[#2017 state:resolved]
533b131
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 8, 2011
  1. ActiveRecord::Base should pass ActiveModel::Lint.

    Grant Hutchins & Peter Jaros authored
This page is out of date. Refresh to see the latest.
View
10 activerecord/test/cases/base_test.rb
@@ -53,6 +53,16 @@ class Weird < ActiveRecord::Base; end
class Boolean < ActiveRecord::Base; end
+class LintTest < ActiveRecord::TestCase
+ include ActiveModel::Lint::Tests
+
+ class LintModel < ActiveRecord::Base; end
+
+ def setup
+ @model = LintModel.new
+ end
+end
+
class BasicsTest < ActiveRecord::TestCase
fixtures :topics, :companies, :developers, :projects, :computers, :accounts, :minimalistics, 'warehouse-things', :authors, :categorizations, :categories, :posts
View
2  activerecord/test/schema/schema.rb
@@ -305,6 +305,8 @@ def create_table(*args, &block)
t.references :student
end
+ create_table :lint_models, :force => true
+
create_table :line_items, :force => true do |t|
t.integer :invoice_id
t.integer :amount
Something went wrong with that request. Please try again.