Displaying 20 results from an estimated 200000 matches similar to: "Drop down lists"
2008 Dec 18
2
Render a view from console
Hello!
In my application I''m trying to render a view from a class in /lib
folder. I have found that it''s very similar to render a view from
console. So, I have tried different methods:
>> string = ActionView::Base.new.render( :inline => ''works'', :layout => false )
=> "works"
>> string = ActionView::Base.new.render( :template =>
2008 Feb 28
2
change drop down list to radio buttons
In my RoR app I would like to change a drop down list, which dispays a
list of colors selected from the database. Instead I would like to
create a radio button for each color. The user is allowed to check one
color and this will be saved back into the database as the color for
this user.
I don''t know how to do this. Currently it looks like this:
<%= select(:user, :color_id,
2007 Dec 01
3
Rails 2 problem with compute_public_path
I''m trying to migrate to Rails 2, but keep getting these errors all
over the place:
ActionView::TemplateError: wrong number of arguments (2 for 3)
On line #61 of users/new.rhtml
58: <% if @captcha_error -%><div class="fieldWithErrors"><
% end -%>
59: <table class="signup"><tr>
60: <td
2007 Dec 27
4
Help With partials
ok i''m having problems moving a piece of code into a partial
I have a line in a view:
<%= image_tag( createturing ) %>
moving to a partial _createturing.rhtml and changing the view to:
<div id="turing"><%= render(:partial => "createturing") %></div>
gives errors:
ActionView::TemplateError (can''t convert nil into String) on
2008 Oct 16
4
Removing values from a select (drop-down) box
Hello,
I am working on a project, and on one form we have a select (drop-
down) box where the user needs to be able to select from a list of
clients. The box is currently being populated with:
<%= collection_select(:client, :id, @account.clients, :id, :name) %>
The problem is that some of these clients may have already been
selected, and we need to remove them from the list. Is this
2008 May 08
0
stub sub partials when testing partial with rspec
Hello all
I prefer to use many partials. It makes my code more DRY
Also I use rspec, and when I have to test partial with sub partials I
have a problem.
if I stub render, then my partial will not be rendered. If i do not
stub render it tries to render sub partial (and i don''t need this)
Not very long googling did not bring the answer, so I made very dirty
and IMHO dangerous function
2007 Jan 04
1
rmagick working in console but not in my app
hey all,
When I do this in script/console I get:
>> require ''RMagick''
=> true
>> include Magick
=> Object
>> f = Image.new(100,100) { self.background_color = "red" }
=> 100x100 DirectClass 16-bit
>> f.crop_resized(50,50)
=> 50x50 DirectClass 16-bit
But in my application I keep getting the same error as if rmagick was
not
2008 Sep 18
2
Setting up Fleximage
Hello!
I''ve been trying today to setup fleximage to handle photo uploads to a
RoR application by following the tutorial that is provided
(http://github.com/Squeegy/fleximage/wikis/gettingstarted)
Originally, I just dropped in all of the sample code that they provided,
which I copied below this question.
- When I tried to access "new" to upload a new photo, I received an
error
2009 Feb 03
2
Rails 2.3 problem...
When moving to Rails 2.3.0RC1 I get an error with concat!? I can''t
figure it out. See the dump below:
ActionView::TemplateError (You have a nil object when you didn''t expect
it!
You might have expected an instance of Array.
The error occurred while evaluating nil.<<) on line #158 of
app/views/places/show.html.erb:
158: <div
2006 Aug 27
1
created scaffold, failing when creating new?
ActionView::TemplateError (You have a nil object when you didn''t expect
it!
You might have expected an instance of Array.
The error occured while evaluating nil.include?) on line #5 of
app/views/admin/_form.rhtml:
2:
3: <!--[form:profile]-->
4: <p><label for="profile_name">Name</label><br/>
5: <%= text_field ''profile'',
2008 Jul 23
0
Link_to_remote object missing
Hello, I''m in troubles trying to use ''link_to_remote'' on Rails 2.1.
Having this page:
<h4>Editing project</h4>
<% form_for(:project, :url => project_path(@project), :html =>
{ :method => :put }) do |f| %>
<p>
Name <%= f.text_field :name %>
Date <%= calendar_date_select :project, :target_date, :time =>
2008 Jan 01
1
functional tests
Hi,
Im stating to play with rails testing and have hit a slight snag that
i''m hoping someone can hit me with a clue bat for.
I have my models and associations set up correctly and all is working
as it should.
I only have the auto generated tests at the moment and the
test_should_get_index test is failing.
The controller is just a default controller but i get the following
error on the
2009 Jan 11
2
Got an error on returning data as json format when the data is nil
Hi there,
One of my app''s actions returns data as a json format.
If the data exists, everything works perfect.
But if the data is nil, I get the following error.
--------------------------------
ActionView::MissingTemplate (Missing template user/show.erb in view
path /var/www/my_app/releases/20090110234348/app/views:):
2007 Oct 29
2
UI drop down list pulled from database values in activescaffold
as i''m finding it difficult to override the form Ui elements using
activescaffold -= i''m looking for a help to build a drop down list in
UI (values pulled from databse through SQL query) and so user can
select these valus while submitting to database.
pls provide any example strictly using activescaffold plugin.
thanks
selvan-kalaiselvan
2008 Jul 06
1
ActionView::Base.field_error_proc not getting an error field
In my User form I have standard field to get user record attributes
(first_name, last_name and email)
I also have a select drop_down to choose a role from an array
first_name, last_name and email are user record attributes, but I
defined the role name as a virtual attribute
validates_presence_of :email, :last_name
attr_accessor :role_name
validates_presence_of :role_name, :if
=>
2006 Oct 10
0
drop down lists
Hi everyone,
I am now building a form, and for a field i want to give users only a
small set of predetermined values.
I implemented it as follows:
in the controller i created an array
@ptypes = ["type a", "type b", ...]
in the _form
<%= collection_select :purchase, :product, @ptypes, :to_s, :to_s %>
I am new to rails, and would like to know if there is a standard way
2009 Apr 19
2
Upgrading from Rails 1.3.x to 2.3.2 - text_field_with_auto_complete not working
Folks,
I am trying to upgrade code base from 1.3.x to 2.3.2 and not
surprisingly, lot of things are broken.
''text_field_with_auto_complete'' is not working for me - it gives the
following error:
ActionView::TemplateError (undefined method
`text_field_with_auto_complete'' for #<ActionView::Base:
0x7f0ceb6b8290>)
I already have installed auto_complete -
ruby
2009 Jul 29
6
Doubt in nil object with ajax
hi this is my htnl
<html>
<head>
<%= javascript_include_tag :defaults %>
</head>
<body>
<%= form_tag nil, { :id => ''search_form'' } %>
<%= text_field ''recipe'', ''name'' %>
<%= end_form_tag %>
<div id="recipe">
</div>
<%= observe_form :search_form, :frequency =>
2007 Apr 18
0
Ajax Drog and Drop Sorting Frequency
Hi Friends,
I am new to ROR.I have implemented sorting by Ajax drag and drop and
interaction with database.
Working fine but if i sort records rapidly, getting nil point exception.
I am pasting the sortable list code.
<%= sortable_element(''sortable_charts'',
:update => ''assigned_chart_files'',
:url =>
2008 Apr 09
2
Ruby on Rails drop down help
Hi, I have a really simple problem with ruby on rails. Using a basic
tutorial and scaffolding I have a form with lines like this:
<p><label for="user_game1">Game 1: <%= Game.find(''1'').game %></
label><br/>
<%= text_field ''user'', ''game_1'' %></p>
and I want to change it from a text field to a