Displaying 3 results from an estimated 3 matches for "pageshelper".
2013 Oct 27
5
run simple method from Helper on button click
Greetings,
I''m new to rails and currently having couple problems about how to add
javascript functionality into rails.
I have a simple method in the helper and i want to run this code on
button click.
------------------------------------------------------------------
module PagesHelper
def show_message
"simple output"
end
end
------------------------------------------------------------------
this doesnt work
<%= button_to_function "Print", "show_message()" %>
this doesnt work too
<input onc...
2006 Jul 16
7
form_helpers ?
Just a quick silly question , are form_helpers actually helper.rb files ?
Stuart
2006 Sep 01
0
render file in helper causes WSOD
If I use render :file=>... in a helper function, Rails dies with a
white-screen-of-death (with nothing about it in development.log), but it
works in a controller function, and other render functions (like render
:text) work in the helper function.
# in helper - results in WSOD
module PagesHelper
def body_render(page)
case page.type.name
when ''Markaby Template''
render :file=>page.file, :layout=>false # WSOD
when ''RedCloth Template''
RedCloth.new(page.body).to_html # works, btw
when ''Text''...