Skip to content

Commit 3a8750f

Browse files
committed
Fix button styles for has_many outside inputs blocks
1 parent 8aa5f64 commit 3a8750f

2 files changed

Lines changed: 14 additions & 8 deletions

File tree

app/assets/stylesheets/activeadmin_blaze_theme/_form.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ body.active_admin {
4747
}
4848

4949
// buttons
50+
a.button.has_many_add,
5051
button,
5152
input[type='button'],
5253
input[type='submit'],
@@ -66,6 +67,7 @@ body.active_admin {
6667
}
6768
}
6869

70+
a.button.has_many_add:hover,
6971
button:hover,
7072
input[type='button']:hover,
7173
input[type='submit']:hover,
@@ -75,6 +77,7 @@ body.active_admin {
7577
background-color: #aaa;
7678
background-image: none;
7779
}
80+
7881
> .actions {
7982
margin: 5px 0 0 0;
8083
}

spec/dummy/app/admin/authors.rb

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,17 @@
4444
f.input :avatar,
4545
as: :file,
4646
hint: (object.avatar.attached? ? "Current: #{object.avatar.filename}" : nil)
47+
48+
f.has_many :profile, allow_destroy: true do |ff|
49+
ff.input :description
50+
end
51+
52+
f.has_many :posts do |fp|
53+
fp.input :title
54+
fp.input :description
55+
end
56+
57+
f.actions
4758
end
48-
f.has_many :profile, allow_destroy: true do |ff|
49-
ff.input :description
50-
end
51-
f.has_many :posts do |fp|
52-
fp.input :title
53-
fp.input :description
54-
end
55-
f.actions
5659
end
5760
end

0 commit comments

Comments
 (0)