Displaying 20 results from an estimated 9000 matches similar to: "Providing HTML in an error message generated by validation"
2006 May 30
1
Posting a form to a secure target?
All,
If I want my form action to be a secure target, what is the best way to
go about doing that?
I''m trying to do:
<%= start_form_tag( { :protocol => ''https://'', :host => request.host +
'':3001'', :action => ''login'' } ) %>
in my view, but this doesn''t seem to generate a URL with https:// and my
SSL host in
2006 May 23
3
image_tag problem
Hiall,
I want to make an image_tag from within a controller in order to be
able to present a link (with a status image) in a view. Here is my
controller method (in file webca_controller.rb, hence WebcaController)
def untouched_status_image_tag
image_tag("open", { :alt => "Offen", :title => "Offen", :size =>
"12x12", :class =>
2006 May 03
1
Ruby based HTML - to - text converter?
All,
I am interested in trying to generate a text version of an HTML
document.
Does any one know of any modules that may be of use to me?
A cursory search has not yielded any results.
Thanks,
Wes
--
Posted via http://www.ruby-forum.com/.
2006 Mar 22
6
Relatively easy HTML/XML parsing utilities?
Anyone know of any Ruby modules which can be used to parse an HTML page
?
Thanks,
Wes
--
Posted via http://www.ruby-forum.com/.
2006 Mar 22
3
Which JavaScript effect is this?
http://canadaonrails.com/ (when you hover over news and events)
I''ve seen this implemented on a few rails sites now and I was just
wondering if it is just a simple javascript from the prototype library.
Does anybody know of any links on how to do this?
Thanks in advance!
--
Posted via http://www.ruby-forum.com/.
2008 Oct 12
0
How to test with RSpec a Rails plugin using “link_to” and “current_page?”
I''m writing a Rails plugin that builds up a menu in a view. I''m using
*link`_`to* to build the link and *current_page?* to set
class="active" on the current page.
I''ve *include*d *ActionView::Helpers::UrlHelper* so I can use
*link`_`to*.
To get *current`_`page?* working in the view, I''ve had to inherit the
current class (apparently ActionView::Base)
2006 May 18
2
Utility to translate HTML character entities into text?
Anyone know of a Ruby utility that will translate HTML character
entities into text?
Thanks,
Wes
--
Posted via http://www.ruby-forum.com/.
2008 Feb 26
2
Specify HTML options on select_year
Rails 1.2.3
It appears that the select_year helper doesn''t accept HTML attributes as
part of the options array.
Does anyone have a way to successfully pass an :onchange attribute in to
the select_year helper?
I''m going to do it with Javascript directly for now.
Thanks,
Wes
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You
2006 Feb 10
2
How do I test actionview helpers in the console?
I would like to see the output of actionview helper methods, to be able
to play with it.
When I do the following in the console:
collection_select("job", "client_id" , @clients, "id", "name")
I get:
NoMethodError: undefined method `collection_select'' for
#<Object:0xb7cf1970>
I''d like to get something like:
<select
2006 Apr 18
4
Security considerations with displaying uploaded HTML
I have an application where I am allowing users to upload (or refer the
app. to) arbritrary HTML that I am (currently) displaying in an IFRAME
on a page. The users will be authenticated so it''s not open to the
entire universe.
I was always uneasy with this, but after reading the security chapter of
AWDWR, I am even more concerned.
What kinds of applications do people have out there
2006 May 16
3
Best way to handle namespace collisions?
All,
I have a little namespace collision here. I am trying to use both
RubyfulSoup (an HTML parser - which I highly recommend by the way) and
the ActionView::Helpers::TextHelper class. Within the TextHelper class,
there''s an attempt to create a new "Tag" object. However, Tag is also
defined in the RubyfulSoup gem and it is _this_ Tag class whose
initialize method is
2006 Mar 26
1
How to override generated in validation html code?
Hi,
I would like to ask how to override validation functionality in RoR?
In active_record_helper.rb class there is "hardcoded" default html
generated durning validation.
If I will use
{code:ruby}
validates_presence_of :summary, :description
{code}
in my model class, there is html generated:
{code:html}
<div class="errorExplanation"
2006 May 15
1
Simple: How to use TextHelper in a controller
I''m having trouble succesfully getting access to the
ActionView::Helpers::TextHelper.strip_tags
method from one of my controllers.
If I try to call it directly using
ActionView::Helpers::TextHelper.strip_tags
I get
undefined method `strip_tags'' for ActionView::Helpers::TextHelper:Module
What is the preferred way to make ActionView helpers available to a
descendant of
2006 Jun 27
5
Can''t call public application.rb method from ERb template
All,
I have a left navigation partial that I want to dynamically generate CSS
classes for based on the current controller action.
In my ERb template, I have
<DIV class="<%= get_menu_display_style(''login_form'') %>">
In application.rb, I have the method get_menu_display_style defined as:
public
def get_menu_display_style(action_requested)
2006 Apr 26
2
Routing to a static HTML file under RAILS_ROOT
I have a regular plain old static HTML file under my RAILS_ROOT that I
would like to serve as itself (without any dynamic anything).
How can I write a route to "pass the request through" succesfully.
I tried
map.connect ''path_to_file'', :controller => nil, :action => nil, :id =>
nil
but that didn''t work.
Also, note that I have this route
2006 Mar 07
2
Using form_tag_with_upload_progress
All,
I''m attempting to use "form_tag_with_upload_progress"
http://railsmanual.org/module/ActionView::Helpers::UploadProgressHelper/form_tag_with_upload_progress
However, I''m having a hard time understanding what I''m supposed to
provide and where in order to take advantage of it. There''s a lot of
information and I''m sure I can figure it
2006 Jul 14
7
Form validation - keepin correct fields displayed on refresh
All,
I''m finally doing my first real form in Rails - the model object that
I''m entering information for has 8 validations so far.
If I type in good values for all the fields but one, I get the pretty
validation, and the nice field highlighting, but all of the fields are
cleared, forcing me to retype all of that info. That is a big drag.
Is there a standard way to get the
2006 Aug 15
6
Theoretical: Should models be subclasses of AR or mix it in?
All,
My apologies if this is a little long-winded and stream of
consciousness-y :).
SUMMARY: Why do we extend ActiveRecord instead of mixing it in to our
model classes?
Been thinking about my app''s models and starting to want to build
something of a hierarchy. I have some commonality across 3 of my model
classes and I''d liek to aggregate the behavior in a superclass.
2008 Jun 15
11
[PATCH] helper to create fb css stylized table
I attached a rails helper implementation of the fb_table described here:
http://wiki.developers.facebook.com/index.php/Facebook_Styles
I included testing and comments. I hope you find it useful.
Curiously, it''s really a small extension of FBML.
Richard
-------------- next part --------------
Index: test/rails_integration_test.rb
2006 Jul 05
3
PLUGIN newbie: How do I use an installed plugin
All,
I''ve downloaded and installed a plugin into my vendor directory. How do
I then take advantage of it?
It has an init.rb file which has the appropriate require.
What do I need to do to make sure that the plugin code gets loaded?
Thanks,
Wes
--
Posted via http://www.ruby-forum.com/.