similar to: ActionView::Helpers::FormHelper.text_field

Displaying 20 results from an estimated 2000 matches similar to: "ActionView::Helpers::FormHelper.text_field"

2006 Apr 08
2
ActionView::Helpers::FormHelper instance methods should take an object reference rather than an object_name.
Hi ActionView::Helpers::FormHelper methods (e.g. #text_field, #check_box...) take object_name as an argument. From this argument they infer a name that is supposed to contains the reference to the relevant object. I can''t see why the FormHelper methods were designed that way. Compared to simply passing them a reference, the current way seems too complicated and an invitation to problems
2006 Jan 10
0
Changing scaffold''s text_field to a password_field causes white screen of death in mozilla?
I had posted earlier about ''silent failure of a controller'', what seemed to be an intractable problem where I was getting failure of a particular action in a controller while others worked. What was irritating was that there were no useful messages. Nothing to the browser, nothing in logs, and even the breakpoints wouldn''t hit. Finally by a process of elemination I found
2005 Dec 19
2
Validation that works in the controller
Hi, Is there a way of validating input inside the controller? or an equivalent to ActiveRecord::Validations::ClassMethods.validates_presence_of ? Cheers, -- Colin
2006 Jan 21
1
text_area content with text_area and not text_area_tag ?
Hello, Is it possible to fill the textarea content when using the text_area function ? Why there is 2 , + or - similar class : FormHelper and FormTagHelper ?
2006 Jun 18
0
Framework question about FormHelper ...
Hello, I don''t understand how formhelper works (In a Framework point of view) ... For example if I use the chek_box formhelper 1/ check_box("puppy", "gooddog", {}, "yes", "no") will call @puppy.gooddog BUT, how it is possible since the check_box has only a string parameters not instance object ? 2/ if you create your own helper which generate
2006 Sep 04
1
Overriding ActionView::Helpers::InstanceTag::DEFAULT_TEXT_AREA_OPTIONS
What is the best way to override some of the FormHelper default options? Right now I''m adding this to the beginning of my environment.rb: ActionView::Helpers::InstanceTag::DEFAULT_TEXT_AREA_OPTIONS = { "cols" => 80, "rows" => 5 } Is that the way it''s supposed to be done? --~--~---------~--~----~------------~-------~--~----~ You received this message
2007 Nov 01
0
Using view helpers from a controller
Hi, I want to access a view helper from a controller. (Of course, you all want to know why??? -- See below.) To be specific, I want to access methods such as ActionView::Helpers::FormTagHelper -- form_tag and text_field_tag from either a controller or from a new class (in models? or lib?). If I create the new class then that class''s methods need to also be able to access the
2006 Feb 03
2
_form rendering question for adding multiple child objects
Hi I have been following a thread here.. http://www.ruby-forum.com/topic/new?forum_id=3 but it did raise some new curiosities that I hope someone can help address here :) In particular it is with Duane''s super secret hack that works for multiple child objects > There''s a super-secret and mostly undocumented way of doing this > that''s kind of handy, actually.
2006 Feb 21
1
formhelper methods don''t work with render collection partials
I''m rendering a partial using a collection: <%=render(:partial=> ''record'', :collection => @records)%> Inside the partial, I''m attempting to create a new form for each row, generating elements like the following example: <%= text_field "record", "name" %> However, though my objects are fully populated, these form tags
2010 Feb 20
1
formhelper password_field only takes two arguments
When I look at the docs, password_field seems to take 3 arguments. So when I ''play around" with things and I attempt to pass three arguments to password_field ... I get an error saying that it only takes two parameters ("3 for 2") I am totally lost. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups
2006 Jun 02
3
Advice, why value_before_type_cast in FormHelper?
I am wondering why is in creating text fields with form_helper used value_before_type_cast instead of attribute value for field value? I set rails enviroment so date fields are in european format (dd.mm.yyyy) and would like to have same format in forms, but because of value_before_type_cast is called, form fields are filled with ''yyyy-mm-dd'' or timestamp integer, etc.
2006 Feb 01
4
Custom view helpers
Hi all, I would like to write some custom helpers like the ones available as form helpers text_field, text_area and the like. My first try was this: custom_helper(obj, meth) ''some_string'' + obj.send(meth) + ''some_other_string'' end Object and method are being passed as symbols like this: custom_helper(:person, :name) and Ruby rightfully complains that
2009 Feb 15
2
text_area_tag not escaping content by default
I stumbled on the fact that text_area_tag does not HTML escape its content by default. For example: text_area_tag "body", "</textarea><script>alert(''xss'');<script>" If you try that, you''ll see that the content is inserted literally. Considering the fact that the tag helpers all encode their attribute values by default, does this
2006 Jun 24
1
select or select_tag ?
hello PPL, I''ve seen now that the _form.rhtml generated by script/scaffold is populated by <%= text_field ''model'', ''field'' %> without _tag! but only text_field_tag is to be found in the 1.1.2 documentation.. (like in the rest of Module ActionView::Helpers::FormTagHelper there is _tag) I''ve tried to use <%= select instead of
2010 Aug 14
0
[rails3.0.0.beta4] extend form_tag to always include a hidden field
hi there, I want every form in the site to add a hidden_field, basically I want them to always submit the I18n.locale, I''ve tried to alias form_tag_html method of ActionView::Helpers::FormTagHelper like this: # in #{MY_APP_ROOT}/lib/action_view/helpers/form_tag_helper.rb module ActionView::Helpers::FormTagHelper def form_tag_html_with_locale(html_options) form =
2006 Apr 05
1
FormTagHelper form names: possible?
Thank you to everybody that has helped me since I signed up. I''m flying along thanks to you. I have a question about the FormTagHelper "start_form_tag": I''ve been trying to figure out how to get Rails to output a "name" attribute for my form so I can hook in a Javascript to focus on a field inside of it on load, but it doesn''t look like I can do
2007 Jul 22
2
undefined method `stringify_keys'
Hello I have a view for user registration but when i try to view this page i get this error: undefined method `stringify_keys'' for "username":String Here''s my registration.rhtml: <% form_tag :controller => :user, :action => :register do %> <fieldset> <label for="username">Username>/label><br/><%= text_field_tag
2008 Jun 05
2
how to add a method without coding it directly into app?
i''m missing something here. how would I code this outside the application to be shared with other Camping apps? module Blog::Controllers module AuthenticationHelper def self.included(base) class << base define_method :authenticate do |*a| a.each do |meth| if method_defined?(meth.to_s)
2007 Jan 02
1
How to extract the variance componets from lme
Here is a piece of code fitting a model to a (part) of a dataset, just for illustration. I can extract the random interaction and the residual variance in group meth==1 using VarCorr, but how do I get the other residual variance? Is there any way to get the other variances in numerical form directly - it seems a litte contraintuitive to use "as.numeric" when extracting estimates,
2006 May 19
1
pass text_field to controller when using periodically_call_r
Hi. Can anyone help with this? In a view, I have a text_field_tag( :mytextfield ). I would like to pass the current value of that text_field_tag to a periodically_call_remote - something like periodically_call_remote( :url => { :action => :do_it, :thetextval => :mytextfield.value } ) - Any idea how can I pass and/or access the value of the text_field_tag in my do_it controller?