Skip to content

Commit

Permalink
Merge pull request #345 from ydah/fix-typo
Browse files Browse the repository at this point in the history
  • Loading branch information
okuramasafumi authored Oct 14, 2023
2 parents 5da4322 + 93cf089 commit 2fde6a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/migrate_from_jbuilder.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This guide is aimed at helping Jbuilder users transition to Alba, and it consist

## Example class

This example will also be replaced by ActiveReord.
This example will also be replaced by ActiveRecord.

```rb
class User
Expand Down
4 changes: 2 additions & 2 deletions test/usecases/inheritance_and_ignorance_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ class GenericFooResource
attributes :id, :name, :body
end

class RestrictedFooResouce < GenericFooResource
class RestrictedFooResource < GenericFooResource
def attributes
super.select { |key, _| key.to_sym == :name }
end
end

def test_it_ignores_attributes
foo = Foo.new(1, 'my foo', 'my body')
assert_equal '{"name":"my foo"}', RestrictedFooResouce.new(foo).serialize
assert_equal '{"name":"my foo"}', RestrictedFooResource.new(foo).serialize
end
end

0 comments on commit 2fde6a1

Please sign in to comment.