This commit is contained in:
6
app/helpers/books/editing_helper.rb
Normal file
6
app/helpers/books/editing_helper.rb
Normal file
@@ -0,0 +1,6 @@
|
||||
module Books::EditingHelper
|
||||
def editing_mode_toggle_switch(leaf, checked:)
|
||||
target_url = checked ? leafable_slug_path(leaf) : edit_leafable_path(leaf)
|
||||
render "books/edit_mode", target_url: target_url, checked: checked
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user