similar to: Select error

Displaying 20 results from an estimated 2000 matches similar to: "Select error"

2006 Feb 21
7
Validation issues
I have a form. Everything submits into the database if I don''t have any validation rules. When I put these rules: validates_uniqueness_of :title, :message => "already exists in database" validates_presence_of :title I get this error (which seems weird because I am not validating against that): You have a nil object when you didn''t expect it! You
2006 Feb 22
2
Select menu validation
Is there a trick to validating select menus? I have this rule: validates_presence_of :title, :type :title is a text box and validates correctly but :type doesn''t: <p> <label for="resource_type">Type</label><br/> <select name="resource[type]" id="resource_type"> <option value=""
2009 Sep 02
8
select_month helper
I''m trying to rewrite a fusebox-like application (Active4D plugin to 4D database) in RoR/postgres and I''m doing okay - but keep running into things that stump me. It seems like it takes me hours to figure out something that I could have written in pure code in minutes. The select_month and select_day helper has been my latest waste of time. All I''m trying to do is add
2009 Jan 28
1
How to give onchange for select_year rails helper....
<%=select_year(Date.today,:include_blank=>true, :start_year => Date.today.strftime("%Y").to_i, :end_year => 1999)%> i am using rhis helper... now i want to give onchange here.... Please help me to solve this .... thanks in advance JK -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because
2006 Apr 06
6
select method
The documentation states as an example: select("post", "person_id", Person.find_all.collect {|p| [ p.name, p.id ] }, { :include_blank => true }) could become: <select name="post[person_id]"> <option></option> <option value="1" selected="selected">David</option> <option
2006 Aug 17
1
2 newbie question
Hey all, I have 2 newbie questions, 1st question: <%= collection_select (:region, :id, @regionall, :id, :title,options={:prompt=>"- Select cat -"}) %> Ignores the :prompt part while options={:include_blank => true} works. Any idea what I?m doing work with :prompt ? 2nd question: How can make my collection_selected to display it''s third key by default? I know it has
2008 Jun 26
2
Problem with date_select after Rails 2.1 upgrade
Folks, I think I should start a new thread for this, because a similar one I saw is a bit old and the resolution there doesn''t seem to apply to what I''m running into now. Anyway, my date_select calls are bombing on me with the exception: ---- ActionView::TemplateError (wrong number of arguments (3 for 2)) on line #8 of entries/_dates_form.haml: 8: = date_select(
2006 Jan 03
1
RequireResourceHelper for JS and CSS
The following was posted on my blog at http://blog.inquirylabs.com. A friend of mine recently expressed interest in this code snippet, so I thought I''d send it out to anyone else who''s interested. This module makes it a lot easier to ''require'' javascript and cascading stylesheet dependencies inside your views or controllers. By
2009 May 22
1
[PATCH server] fixed smart pool 'save' regression.
The recent refactoring didn't work properly for new smart pools, so I've cleaned jup the parameter handling for the various pool 'create' actions. Signed-off-by: Scott Seago <sseago at redhat.com> --- src/app/controllers/hardware_controller.rb | 5 +---- src/app/controllers/pool_controller.rb | 6 ++++-- src/app/controllers/resources_controller.rb | 6
2013 Jun 22
4
ActiveRecord::Base.transaction - SystemStackError - stack level too deep:
Im having an issue that seems to only happen when trying to use a transaction. Ive used transactions many times in the past and Im at a loss as to why im getting the stack level too deep problem. SystemStackError - stack level too deep: actionpack (3.2.13) lib/action_dispatch/middleware/reloader.rb:70:in `'' I have a StackOveflow with more detail -
2006 Feb 17
4
Why doesn''t this work!
I have this in my controller... @tech_standards = TechStandard.find_by_sql("SELECT * FROM tech_standards WHERE subpoint <> 0") Everything is fine except when I look at my view I still get supoints that are 0. When I run this query in my query browser I don''t. View: <select name="resource[tech_standard]" id="tech_standard">
2006 Feb 13
7
Concatenation
I have this: <%= @tech_standard.category + " " + @tech_standard.point + "." + @tech_standard.subpoint %> I get this error: cannot convert Fixnum into String point and subpoint are number. How do I concatenate those values? Seth Buntin Web Resources Coordinator Kentucky Academy of Technology Education Murray State University --------------
2006 Feb 10
3
RoR, Apache 2, FastCGI
I have everything working and I am really excited about learning Ruby and Rails. But whenever I access my different defs in my controller it takes ~ 5 seconds before they are returned. I am working locally so I don''t know what the issue is. System Details: Windows XP Apache 2.0.55 Ruby 1.8.2 Rails 1.0 Seth Buntin Web Resources Coordinator Kentucky Academy of Technology
2006 Feb 21
4
Error, got String?
I am getting this error. ActiveRecord::AssociationTypeMismatch in Resources#create Focus expected, got String I have a select menu named resource[focus]. My focus (belongs_to :resources) table has a one-to-many relationship with the resources (has_one :focus) table (A resource will have only one focus but one focus will have many resources). I assume this error means that the focus is
2016 Apr 11
1
[PATCH] RFC: php: support PHP 7
Adapt to the API changes in the newer versions of the Zend framework, in particular regarding: - strings handling - resources handling (used for the guestfs_h pointer) - iterating in hash maps - data types for function arguments Introduce helper macros to reduce greatly the amount of #if's all around the generated C code. --- generator/php.ml | 96
2006 Mar 16
3
ACLSystem and session variables
I am using the ACL System that is described on the Rails wiki and I have a quick question. I want to set the "role" as a session variable so that I can display certain navigation schemes and I was doing it like this: @session[:user][:role] = @user.roles When I print out this variable I get: #<Role:0x3262d80> How can I turn this into a readable value? I tried .to_i
2006 Mar 01
2
Help with Many-To-Many insert
I am having issues with a many-to-many table. The table relates resources to standards, but in my resources table has one-to-many relationships so those also appear in my many-to-many table. I am trying to insert into the table via: @resource.core_contents << CoreContent.find(params[:core_content_ids]) But I get this error: Mysql::Error: Duplicate entry
2006 Feb 17
2
Helpers?
Would I use a helper for this situation? I have a layout that is used over two controllers (admin and login). Each controller has their own navigation. Can I do something like this? <%= getNavigation("admin") %> or <%= getNavigation("login") %> And return the navigation list depending on the string sent? Seth Buntin -------------- next part
2006 Mar 17
7
OT: Subversion folder cleanup
How do you clean up your app folder to place onto the server? I want to get rid of all the .svn stuff. Seth Buntin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060317/cc81d9f7/attachment.html
2006 Jan 01
7
Can''t get select helper to populate dropdown w/default value
Guys, I searched this forum and found plenty of people having this problem, but I didn''t see any definitive solution. Usings Rails 1.0. When I edit an existing record, I can''t get the basic "select" helper to display the current value contained in the field of the record. All of my other (text) fields populate correctly with current field values. There appears