similar to: add method parameter for form helper

Displaying 20 results from an estimated 20000 matches similar to: "add method parameter for form helper"

2006 Aug 16
4
Overwrite form helper methods and call old ones in new ones?
Hi all All my forms should look the same, so I think always putting the right div etc. tags around them is a violation of the DRY principle. Until now my forms look like that: <div class="text_field"> <label for="news_item_subject">Subject:</label> <%= text_field "news_item", "subject" %> </div> Now I want the default
2006 Aug 07
8
Login form question
I''m using Rails Recipes to create a login form but instead of username and password, my setup is firstname, lastname, password. I seemed to be gramatically challenged and not sure how to set up the parameter list. Can anyone offer up a suggestion. The book shows the method starting like: if request.post? user = User.find(:first, :conditions => [''username = ?'' ,
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 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 =>
2009 Nov 26
9
ActionView::TemplateError (can't convert ActiveRecord::Error into String)
I cannot work out why this error is appearing. ActionView::TemplateError (can''t convert ActiveRecord::Error into String) on line #3 of app/views/button/_show_enquiry.html.erb: 1: <h1>Send us a message</h1> 2: <% remote_form_for :enquiry, :url => {:action => ''send_mail''} do | f| %> 3: <%= error_messages_for ''enquiry'',
2006 Apr 10
3
Problems with multiple ActiveRecords and Validations
Hi all, I am a RoR newbie and have the following scenario set up: There are 2 ActiveRecords involved, the first one being "User", the second one being "Visibility". The corresponding users table holds address informations regarding a User. The visibilities table holds visibility settings for the individual columns of the users table (i.e. firstname, lastname, country
2005 Dec 30
3
NewbieQ - Relational tables
Hi all, I''m going nuts on a very simple issue. I know what I want but don''t know what to tell rails to do so. I have a very common setup for managing contacts. A companies table and a contacts table. As you''ve guessed it''s a one to many relationship. The database is setup with the appropriate foreign keys, the models have been generated and I added the
2006 Aug 08
1
form parameter
How can I change some parameters in a function of the controller. I have a User_Controller, who''s responsible for update the information fields in the database. The parameters are "id", "firstname" and "lastname". Now, I want to manipulate parameter "lastname", because I would like to add at the end a point. >> Thomas Miller
2006 Jul 17
2
error_messages_for ?
Hi, I can''t list error_messages in my Form ??, and all the formfields are reset ...(I think my redirect :back clean everything, formfield and error_messages ...), only my flash[:notice] is ok.... I would like to use the "error_messages_for" tag to add a simple red * on my textfiled if a problem occurs ... thanks for help arnaud here are the basics steps to check that
2006 Jan 09
2
catch id from form and copy between objects
Hi all, Not completely sure what I''m doing, but I need to get data from another table based on and id. Below is some breakpointer output: irb> @params => {"project"=>{"project_description"=>"point2", "project_name"=>"break2"}, "action"=>"create_project",
2006 Feb 26
2
howto keep already entered form fields
Hi, is there a way to keep the already entered form fields when the form is re-displayed after some error has been detected and reported to the user via flash? Regards IJD -- Posted via http://www.ruby-forum.com/.
2011 Jun 11
1
Having a problem adding a foreign key
I keep getting this exception "SQLite3::SQLException: no such column: books.user_id: SELECT "books".* FROM "books" WHERE ("books".user_id = 4)" ,which sounds like there is no user_id in books table.So i just installed foreigner plugin and added " t.integer :user_id, :null => false" and "add_foreign_key(:books, :users)" in book
2018 Sep 29
3
Authenticate users using their firstname
Hi, I'm setting up a Postfic and Dovecot with LDAP email server. My users in LDAP is like this: dn: uid=firstname,ou=People,dc=domain,dc=com uid: firstname uidNumber: 4025 gidNumber: 4025 givenName: firstname objectClass: top objectClass: person objectClass: posixAccount objectClass: shadowAccount objectClass: organizationalPerson objectClass:
2006 Aug 18
3
setting a value of text_field from a controller
Hi, I need to set up an initial value from controller. In my views I''ve something like <%= text_field "object", "name" %> and would like to do something like this from controller def index @object[:name] = ''default value'' end but still got an error. Object doesn''t have database model (and will not have) Thank you PS: now using
2018 Oct 01
2
Authenticate users using their firstname
> On 01 October 2018 at 15:19 Steffen Kaiser <skdovecot at inf.h-brs.de> wrote: > > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Sat, 29 Sep 2018, Fady AL HAYALI wrote: > > > I'm setting up a Postfic and Dovecot with LDAP email server. My users in LDAP is like this: > > > > dn: uid=firstname,ou=People,dc=domain,dc=com > >
2009 Aug 25
5
uninitialized constant
API-> hello_message_api.rb. class HelloMessageApi < ActionWebService::API::Base api_method :hello_message, :expects => [{:firstname=>:string}, {:lastname=>:string}], :returns => [:string] end controller -> class HelloMessageController < ApplicationController web_service_api HelloMessageApi web_service_dispatching_mode :direct wsdl_service_name
2006 Jul 26
2
Question about Recipe 52
I''m reading Rails Recipes, for the precision the recipe 52 that speak about ''Making your own Rails plugin''. The question, so stupid, is that i don''t understand wath do the code def self.search(query, fields, options = {}) find :all, options.merge(:conditions => [[fields].flatten.map { |f| "LOWER(#{f}) LIKE :query"}.join(''
2018 Oct 01
1
Authenticate users using their firstname
On Mon, Oct 01, 2018 at 11:25:48PM +0200, Admin wrote: > > > Von unterwegs gesendet > > > Am 01.10.2018 um 18:27 schrieb Aki Tuomi <aki.tuomi at open-xchange.com>: > > > > > >> On 01 October 2018 at 15:19 Steffen Kaiser <skdovecot at inf.h-brs.de> wrote: > >> > >> > >> -----BEGIN PGP SIGNED MESSAGE----- >
2015 Jan 19
1
dsadd doesn't work correct
Hi together, I installed samba 4 on a server with Debian-Wheezy-OS. Everything seems to work fine. I can add a user with RSAT. The user is added to the AD, the profile is stored in the server-profile-path and homepath can be accessed. I have to import about 400 datasets to the AD. Therefore I want to use the commandlinetool dsadd. With this tool I can import datasets, which I can see with RSAT.
2006 Oct 23
3
passing parameter to action
i have a table of data in my application. i would like to be able to sort the data in the table by clicking on the column header. the way i was thinking i want to do this is just by making a ''sort'' action, and then calling the sort action from each link in the table header (passing the respective column name). it doesn''t seem to be possible to pass parameters to an