similar to: date_select for valid days only. No Feb 30

Displaying 20 results from an estimated 1000 matches similar to: "date_select for valid days only. No Feb 30"

2006 Jul 22
5
Prototype error. replace content inside a <TR> in IE
Does anyone know of a fix for the issue with prototype and replacing table rows in IE? render :update do |page| page.replace "row_#{params[:id]}", :partial => ''wireless_request/wrequest'', :locals => {:wrequest => @wrequest} end This ends up making IE throw an "rjs error [object error]" Searching around I found a couple of posts about
2006 Jul 11
5
What are people using for date fields
I''m just curious about what techniques others have successfully used to capture date data on forms as an alternative to the standard date_select. I have to admit I''ve been lazy and only used the date_select as we have very few dates in our system now, but that is about to change. I would like something better. Any thoughts? -- Thanks, Sam -------------- next part
2006 Jun 23
10
Don''t un-admin the last administrator
I have a User class with a field called admin which is a boolean that determines if the user is or is not an administrator. I want to make it impossible for the last administrator for an account to be removed from the system. I need to protect against this both when deleting a user and when editing a user as you can revoke a user''s administrator privileges via a form. User
2006 Jun 26
8
[Semi OT] BlindDown and a floated div
I am using the drop shadow technique described at http://www.1976design.com/blog/archive/2003/11/14/shadows/ to give several of my divs drop shadows. That part works fine. What doesn''t work so well is when I try to BlindDown a div in Firefox and it ends up ignoring the content below it and just overlapping it. In IE this problem does not occur. In Firefox the overlapping does
2006 Jun 14
3
Which Payment Gateway?
I am working on an application where users sign up for one of several plans. Each plan has a different monthly fee. There is no long term contract but I would like to bill the users automatically each month unless service is canceled. What credit card gateways would you recommend for use with a rails application? My criteria in order of importance are 1. API that will let me work in
2006 Aug 03
6
create or update -
Hi everyone, I''m looking for a shortcut to finding and updating or creating record depending on the results of the find. So, is there a shorter way to do it than this? @stuff = Stuff.find_by_foo_and_bar("yay","hooray") if @stuff: Stuff.update(@stuff.id, {:foo => "boo", :bar => "hoo"}) else Stuff.create({:foo => "boo",
2006 Jun 19
6
SQL Search Qustion
I am working on writing a search method where a user can type a string of words and I return all the objects that have fields that match all of the words in one or a combination of fields. Person first_name last_name Pet name Person has_many :pets I want to write some SQL so that if I search for "Tony AAAA" I will get all the people who have Tony and AAA either in their
2006 Jul 02
2
:include breaks has_many :order
It would appear that using :include on a model that has_many with an :order on another model makes it so that the order is ignored. Is this supposed to happen? Strikes me as odd behavior. For example class Farmer < ActiveRecord::Base has_many :cows, :order => ''position'' end class Cow < ActiveRecord::Base acts_as_list :scope => :farmer end If I do
2007 Feb 03
1
How can I bypass caching for some users
I have action caching setup for several actions of an application but I want the caching to only run for my administrators and have all other users see non-cached pages. Is there a way to do this? Perhaps something like passing a block to caches_action or setting some sort of flag in my authentication method? If this is not possible with action or fragment caching does anyone know of a
2006 Jun 20
2
Validation error_messages_for problem
I am having trouble getting error_messages_for to work. My controller(relevant parts) looks like def configure @account = session[:account] @user = User.new end def add_new_user_to_account @user = User.new(params[:user]) if @user.valid? session[:account].users << @user end redirect_to :action=> ''configure'' end end and my
2006 Jun 23
2
Queue 3 or more RJS actions
My .rjs file page.visual_effect :BlindUp, "people", :queue => ''front'' #first action page.replace_html "people", :partial => ''person/person_compressed'', :collection => @search_results , :queue => ''end'' #second action, after first is done page.visual_effect :BlindDown, "people" , :queue =>
2006 Jul 02
3
2 before_filters, only want one to render something
I have two before_filters for a few of my controllers. They are running my own methods authorize and admin_authorize. authorize is called on just about every action to make sure that a user is logged in. admin_authorize is called on about 80% of the actions and is used to make sure that a user is an administrator. If a user tries to access an admin_authorize protected action without being
2006 Jun 16
2
[Slightly Off Topic]How to handle downgrades
Let''s say that there is a web application which comes in several different plans. Each plan has a different number of users and content items allowed for an account. Obviously we can allow the user to upgrade to a higher level plan by just increasing their limits but how do we handle downgrades? If the user is only allowed x items on the downgraded plan and they currently have
2006 Aug 30
3
Dhtml Calendar Engine undefined method popup_calendar
Hi, I''m trying to use the above engine following the installation here http://dry.4thebusiness.com/DhtmlCalendar.html . The only exception to the install is I downloaded and unzipped the install into the plugins directory from Ruby Forge http://rubyforge.org/projects/dhtmlcalendar/ I''m using Instant Rails and Rails V1.1.6., The engine plugin is also installed The engine
2006 Jul 31
6
Popup Calendar and DateBoxEngine and Change Made ...
Community, I have been putting off implementing a Date selector for too long. Tonight, I finally put it in. I made the choice to go with the datebox engine. Once I got it installed and working, I realized I didn''t like the way it required you to call it. Example: <% @dateField = model.date %> <%= date_box %> or... <% @dateField1 = model.date %> <%=
2006 Jul 21
1
Lighttpd for rails app subdomain apache for the rest
I want to host a rails app at mydomain.com/railsapp. For technical reasons I have to leave mydomain.com on apache. This means that I need to tell apache to proxy only requests for mydomain.com/railsapp to lighttpd. I have deployed in a situation like this before around a year and a half ago but it was a real pain. Lighttpd and rails have matured a lot in the year and a half since I did
2006 Jun 09
0
Sortable list with non ajax submission
I am trying to create a sortable list that is submitted not with an AJAX call but by a standard form submit button. Right now I have def reorder_group_members @group = Group.find(params[:id]) @group.group_members.each do |member| member.position = params[:memberlist].index(member.id.to_s) + 1 #I get a nil error for this line. It would seem that params[:memberlist] is not
2006 Jul 31
20
RADRAILS installation guide
hi all is there eany installation guide that explais how to set up RadRails and how to create a RoR project with eclipse? thanks -- Posted via http://www.ruby-forum.com/.
2007 May 22
4
Process safe log files with multiple mongrels
I have a rails application that runs on multiple mongrels and I would like to make the log files non-interlacing. Are there any logging modifications/other loggers out there that I could use to create process safe logging? Thank you, Matt Margolis
2006 Aug 03
5
DRYing up the view
Hello everyone! I have generic views for CRUD operations For example I render(''shared/list'') from controller shared/list.rhtml ... <% for item in @list %> <tr class="<%= cycle ''list-line-odd'', ''list-line-even'' %>"> <%= render :partial => ''item'', :locals => { :item => item } %>