This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def custom_text(text) | |
if text.blank? | |
"" | |
else | |
text = RedCloth.new(text).to_html | |
if text[0..2] == "<p>" then text = text[3..-1] end | |
if text[-4..-1] == "</p>" then text = text[0..-5] end | |
text = text.gsub("<p>", "") | |
text = text.gsub("</p>", "") | |
return text |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% form_for :email, :url => { :controller => 'contact', :action => 'send_mail' } do |f| %> | |
<%= f.label :name %><br /> | |
<%= f.text_field :name, :size => 60 %><br /> | |
<%= f.label :address %><br /> | |
<%= f.text_field :address, :size => 60 %><br /> | |
<%= f.label :subject %><br /> | |
<%= f.text_field :subject, :size => 60 %><br /> | |
<%= f.label :body %><br /> | |
<%= f.text_area :body, :rols => 10, :cols => 60 %><br /> | |
<%= submit_tag "Send Email "%> |
NewerOlder