Skip to content

Commit 6fae4db

Browse files
use single button for singular resources
1 parent 3629032 commit 6fae4db

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

app/definitions/profile_definition.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,16 @@ class ProfileDefinition < ::ResourceDefinition
44

55
edit_page_title "Edit Your Profile"
66
index_page_title "Team Members"
7+
8+
class Form < Form
9+
private
10+
11+
def render_actions
12+
input name: "return_to", value: request.params[:return_to], type: :hidden, hidden: true
13+
14+
actions_wrapper {
15+
render submit_button
16+
}
17+
end
18+
end
719
end

packages/hackathon/app/models/hackathon/health_and_safety.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,16 @@ class Hackathon::HealthAndSafety < Hackathon::ResourceRecord
2929
def consented
3030
valid? ? "Accepted" : "Declined"
3131
end
32+
33+
class Form < Form
34+
private
35+
36+
def render_actions
37+
input name: "return_to", value: request.params[:return_to], type: :hidden, hidden: true
38+
39+
actions_wrapper {
40+
render submit_button
41+
}
42+
end
43+
end
3244
end

0 commit comments

Comments
 (0)