similar to: re-selecting a select list on create

Displaying 20 results from an estimated 5000 matches similar to: "re-selecting a select list on create"

2005 Dec 17
12
new rails-based cms is born.
hallo, i would heavily like to get some feedback on our rails-based cms: rcms.oopen.de so, if some could find the time an try it i''d be pleased.. greetings rene
2005 Dec 15
0
getting a value from a select list
I''m sure this is an easy question to answer but here is what I am trying to do: I am using this method: @newsletters = Newsletter.find(:all, :order => ''name'') collection_select(:newsletter, :id, @newsletters, :id, :name) I can''t seem to get the id out of the :newsletter param. When i see the post in the logs it has Parameters:
2005 Dec 19
6
how to do security??
hey, i have maded some security in my website based on http://www.chaconforcongress.com/accounts/login Here they work with users, roles and persmission, and they check it like this, user.has_permission(permission). I have extended this to: users and groups with roles and permissions. With permissions like "view records","edit records","delete records",... def
2009 Jan 15
2
collection_select not selecting default value
Hi, I''m trying to create a dropdown using collection_select. However, I cant seem to get it to select the right option by default. In my controller I have a setup like this: @content = Content.new @content.selection_id = 3 @selections = Selection.find(:all) In my view I have: <% form_for :content, @content, :url => { :action => ''create'' } do |f| %>
2006 Jan 25
2
select list generated from table
Have 2 tables - clients & case_managers class Client < ActiveRecord::Base has_one :case_manager end app/views/clients/_form.html contains line... <p><% collection_select("client", "case_manager_id", \ case_manager.find_all, "name", "id") %></p> and this line generates error... undefined local variable or method
2009 Feb 17
3
Dynamic select box
Hi everyone, I have a problem. I want to display a different select box wether the current user is an admin or an user. So I thought I could do this in my view where my form is displayed : <p class="form-input"> <%= f.label(:role_id, ''Role:'') %> <% if (current_user.admin?) then collection_select(:user, :role_id, Role.find(:all, :order =>
2006 Mar 07
6
how to add onchange javascript event to select field
I would like to add javascript ''onChange'' event handling for a select field, such as <%= collection_select("job", "client_id" , @clients, "id", "name") %> with onChange="xxx" Anyone know how to make this work? Thank you, Scott -- Posted via http://www.ruby-forum.com/.
2019 Aug 23
2
Using [GlobalISel] to provide peephole optimizations
Hi, GlobalISel is fantastic, but obviously lacks a lot of the transforms that makes SelectionDAG so good. Whilst it's plenty usable, you'll find yourself wanting/needing to add a lot of manual little transforms to clean things up. I know of the RFC for a new Combiner with its own syntax (https://reviews.llvm.org/D54286 is the latest I can find of it), but after manually adding my Nth
2013 Jun 18
1
How to Pass Jquery selected dropdown values and radio button values to controller
Hi, I have an advance search page and its code is as follows - I have written my code like this <div class="container"> <%= form_tag search_index_path, method: :get do %> <%= radio_button_tag ''user_type'', ''customer'' %><p>Customer</p> <%= radio_button_tag ''user_type'',
2006 Apr 24
4
creating a select box
Hi trying to create a select box in _form.rhtml. I have a table called organisations that contains fileds, 2 being ''id'' and ''name'' these are the fields I need to bring over to the clients _form.rhtml. whats the best way of going about that?? 2 ways i have seen suggested that I cant get to work -@organisations = Organisation.find_all placed this in def new
2010 Aug 30
1
update form text_field on collection_select selection
I have form and a collection_select control. I would like to update form fields (text box) when I select an item from the collection_select box. It''s like selecting template from the collection_select and the template automatically loads to text boxes. Any help? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups
2009 Sep 14
2
Set a select box with default value selected
I am relating to the book & subject example mentioned in the tutorial mentioned here: http://www.tutorialspoint.com/ruby-on-rails-2.1/rails-examples.htm There is a file that goes like show_subjects.html.erb and it will list all the books for that particular subject we''ve selected. Suppose if there were no books to show for the subject we can ideally show a corresponding message
2005 Jun 06
1
don't want xtab sorting "numeric" factors...
r-gurus, I couldn't find an answer to this and after an hour or so of trying all types or ways to do this, I've given up for now. I'm having trouble getting the results from xtabs to generate "unsorted" factors. I've generated a sample data.frame I want to create a table from, using xtabs, and the results are presented below, > temp treatment itpa qmd
2003 Nov 06
2
created data doesn't remain when split...
I've been trying to figure out why the following is happening.... I've got some data I'll load in from a file... rm(list=ls(all=TRUE)) trees <- read.table( "c:/cruisepak/data.txt", header=T) trees$ct <- 1 And when I create some temp variable, then split the data to perform further processing, the additional column doesn't maintain the data correctly.... mtrees
2007 Jan 11
4
collection_select - how to set selected options?
In a form, I am trying to use collection_select with multiple=true, like so: collection_select(:user, :roles, Role.find(:all), ''id'', ''name'', {}, :multiple => true) %> My multiple select box is rendered fine, but... I want the select to have the current role options for the user pre-selected when I view it. So if there are five roles in the database and
2006 Apr 21
1
select box with multiple rows
I want a select box that displays 5 rows instead of one row and a drop down. so i figure this should work, but it doesn''t. <%= collection_select(:constellation, :region_id, @regions, :id, :name, html_options = {:size => ''5''})%> I am not quite sure how to use that html_options and googling around I didnt find anything directly on point. Any suggestions?
2006 Apr 27
3
collection_select to display 2 fields
I''m trying to get a collection_select generated Drop-down box to display two fields from a table (first name & last name); however, I am having trouble concatenating the symbols. It appears as though any code I put in the 5th argument for collection_select is processed prior to executing the collection_select method. The code executes successfully with 1 symbol in the 5th
2008 Jan 12
1
Collection_Select not showing Selected option
Hi, I''m having some problem with getting collection_select to return the current value when editing a record. According to everything I''ve seen, there was an issue but it''s been fixed, but I can''t figure out why it isn''t returning the current value as a selected option. I''ve checked the table structures, and both the call_driver.product_line_id
2009 Aug 11
5
Dynamic drop-downs in a form_for using AJAX remote_function - Help
Hello - I am fairly new to Ruby on Rails, but feel like I am learning quick. I have what seems to be a fairly unique issue as I cannot find much out there that describes what I''m seeing. Hopefully it''s a very simple fix, and I simply can''t see the forest through all the trees! I am attempting to create 2 related drop-down lists in the same form_for, both using
2007 Aug 03
2
Does collection_select work in list.rhtml?
Hi, I have 2 models: Model 1: er, Columns: <er_id, er_name> Model 2: er_process, Columns: <er_id, er_process_name> er_id is a foreign key for Model 2. When I am creating a new er_process or editing an existing one, I have been successful to use collection_select to show the available er''s so that the user can select a particular er by its name (to populate the er_id