similar to: boolean button helper

Displaying 20 results from an estimated 700 matches similar to: "boolean button helper"

2007 Apr 09
4
How do i switch off error wrapping for a specific field?
Hi, i have some issues with the default rails error wrapping. It wraps errors in a div with class ''fieldsWithError'', which is not good practice in my eyes. Adding a class ''error'' to the field would be much nicer. My solution to the problem: build your own FormBuilder. Funny enough, i found no (nice) possibility to switch error wrapping off while using the
2006 Dec 05
1
Using render inside a FormBuilder (EdgeRails)
I''m using the latest trunk of 1.2-ish, and I''m wondering how to do what I want to do. I am using a form_for :builder I wrote, simply called TableFormBuilder after the rails cookbook, and want to be able to present help icons automatically. I want these icons to appear next to form fields I am rendering. For example, I have this method in helpers/table_form_builder.rb: # This
2007 Dec 09
0
Writing Specifications for Custom Form Builders (and Helpers)
Hello all, Long time reader, first time poster! I am a relative newcomer (no idea what on earth I am doing) to Ruby, Rails and Rspec and have a feeling I am probably trying to run before I know how to walk. I had imagined a cool way of outputting a div around some form stuff which would have a class on it if the related field had errors, something a bit like: <%
2005 Dec 27
2
Rewriting FormBuilder
Hi, I want to extend formbuilder to make it output a lable (I know about labeled_form_helper made by technoweenie), my own formating, and a couple of extra tags inside the form attribute. I was easily able to extend form_remote_to. But when I continue to adjust the way elements are handled I don''t know how to continue. I can''t find the method text_field thats should is
2006 Jul 06
0
radio_button with boolean fields does not work with postgresql
I don''t know what I am doing wrong. I have a User class with a "send_message_emails" boolean field. The value for this is true. In postgresql this is stored as a "t" in the database. In Rails this field is a boolean and is set to true, but for some reason the following code is *not* working... the radio_button is not selected. <%= radio_button "user",
2006 Apr 23
3
custom form builder
In the API docs I found this: "You can also build forms using a customized FormBuilder class. Subclass FormBuilder and override or define some more helpers, then use your custom builder " I couldn''t find any further documentation on this. Where can I read more about this formbuilder class? For starters, where would I define a subclass of this class? TIA, Jeroen --
2006 Jan 12
4
Typecasting and boolean attributes
I have 2 radio buttons like this: <%= radio_button ''group'', ''public'', true %> <%= radio_button ''group'', ''public'', false %> They hold the correct values when viewing the @group object. However, when updating, it does not appear that the params[:group][:public] value is being typecast correctly. As
2011 Nov 20
3
Use Ransack with radio buttons for boolean values
Hello I''m trying to search for active and non active users. These radio buttons work just fine except that it didn''t reselect itself after the form has been submitted. So, what should I do to ensure it will be selected just like how my text field populated automatically after the form has been submitted? = search_form_for @q do |f| = f.radio_button :is_active_false, 1 =
2018 Nov 03
2
[RFC] Implementing asm-goto support in Clang/LLVM
I've been out of the loop for awhile. Is there an email thread about the "removing terminators as a thing" concept? On Wed, Oct 31, 2018, 10:13 PM Chris Lattner via llvm-dev < llvm-dev at lists.llvm.org wrote: > FWIW, I’m generally supporting of this direction, and would love to see > asm goto support. > > Could you compare and contrast asmbr to a couple other
2012 Sep 08
4
dash symbol
In the example below, what is the dash doing between the class attribute and array: (field_helpers - [:label, :check_box, :radio_button, :fields_for, :hidden_field, :file_field]).each do |selector| -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2018 Nov 04
2
[RFC] Implementing asm-goto support in Clang/LLVM
(and FWIW, I'm currently trying to finish the patch that makes this a reality... mostly hard because it has to unwind a loooot of complexity we've built up due to not having this) On Sat, Nov 3, 2018 at 5:47 PM Jeremy Lakeman via llvm-dev < llvm-dev at lists.llvm.org> wrote: > http://lists.llvm.org/pipermail/llvm-dev/2018-May/123407.html > > TLDR; CallInst & InvokeInst
2007 Aug 20
0
FormBuilder in rjs
I have a page, which renders a partial that contains a ''State'' drop down list. Upon change, it re-renders the ''City'' drop down, re- populating it based on selected state_id: Page: /customer/new.rhtml <% form_for :customer, :url => customers_path do |f| %> State: <%= f.collection_select :state_id, State.find(:all), ''id'',
2007 Mar 18
7
How to get more informations about an association at runtime
Hi all I''m working on a Custom Formbuilder. I want it to create me with a single method call checkboxes for a given HABTM association. My model looks like this: [code=ruby]class Member < ActiveRecord::Base has_and_belongs_to_many :preferred_music_styles, :class_name => ''MusicStyle'', :join_table =>
2008 Dec 02
1
form_for with partial using do |@f|
Is it possible to pass this FormBuilder object to a controller and then back to a partial? I have a form rendering a partial that i would like to update with a call to my controller based on user selectable parameters, but when the AJAX comes back, i get this error message because i cannot pass a form builder object between the controller and the view: "undefined method
2006 Jul 18
2
Turn element hidden by default (ajax question)
(this is my first post on the ruby forum. If this is not the right place for this type of question please let me know). Ajax question I have a checkbox that toggles the visibility of another element (a text field) with the code: --- <p><label for="checkbox">Appear!</label> <%= check_box :object_name, :method, :onClick =>
2006 Jul 11
0
Arbitrary elements in form_for?
I would like to use form_for in my project so that I can easily change the style of many forms at once. However, it seems to me like FormBuilders only support certain kinds of form elements(!). Surely there must be a way to add arbitrary labels/form elements to a form. Let''s say I had a form that looks like: ID: (plain-text label) Name: (text field) Birthdate: (date chooser) Picture:
2011 Sep 13
3
Accessing Rails helper method with_output_buffer
Hi all, I cannot figure out how to correctly use the with_output_buffer helper method (located in ActionView::Helpers::CaptureHelper) inside a custom FormBuilder. Below follows a simplified example. I''m trying to achieve the following behavior in an ERB as suggested in the form_for helper docs in the Rails source: ========== <%= form_for @object, :builder => MyFormBuilder do
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
2007 Sep 30
2
Outputing to the browser, how?
Hello, I''m writting some helper methods to write forms, so I have this working code: class TableFormBuilder < ActionView::Helpers::FormBuilder ["file_field", "password_field", "text_field"].each do |name| define_method(name) do |label, *args| @template.content_tag(:tr, @template.content_tag(:td, @template.content_tag(:label,
2007 Jul 15
0
errors_for
Been playing with merb. One of the helpers I liked in rails was on form validations. Found this was real easy to port over, so I thought I''d share. It doesn''t highlight the field with the error, but it gives that same nice little div on top. Say I had an articles controller def create @article = Article.new(params[:article]) @article.save! redirect