similar to: Routing and Parameters

Displaying 20 results from an estimated 1000 matches similar to: "Routing and Parameters"

2006 Jul 26
2
text_field and date_select in collection
hello, i would like to display a collection of records on one page (e.g. an author record with all his/her books). a record contains a text_area (e.g. a description of the book) and a date_select (e.g. when the book was published). <% for @book in @author.books %> <%= text_area ''book[]'', ''note'' %> <%= datetime_select
2005 May 08
3
Overriding date_select in local project to use custom value rather than blank for starting option...
I would like to have a date control on a page and I would like a behavior similar to what you get using date_select with the :include_blank => true option where the first value in the dropdown is "- Month -", "- Day -", or "- Year -" rather than a blank value for the respective month, day, and year select fields. I took a look at the ruby source for
2006 Jun 13
1
How to give conditions in rails
Hi, I have Holiday table. the fileds are id,holiday_date,description. i added new records and list them also. when i listed all the records in the database are listed but i want to list only one particular year records. my holiday_list.rhtml page is as follows <%= stylesheet_link_tag "common", :media => "all" %> <%= error_messages_for ''holiday''
2005 Dec 12
1
Search screens with dates
Tried googling and searching the lists for this. I''d like to do a search on some dates and naturally enough use the date helpers. I have a number of problems: -- datetime_select wants an active record model -- select_datetime does not take the options that datetime_select take - specifically :order that leaves me with something like <label>Date/Time
2006 Jun 17
2
problem with select_date
In my form I have these items: <%= select_year Date.today, :start_year => Schoolyear.get_startdate.year, :end_year => Schoolyear.get_enddate.year %> <%= select_month Date.today.month %> No matter what I do, in my controller I can''t seem to access the selected year and month. I have tried params[:month].to_s and also
2006 Jun 16
3
finding out about options
I''ve been to the RoR api docs trying to find out about options for various methods (mostly for select helper methods), yet I find no listing of options even when the method described says that it takes options. How can I find out what are valid options say for a date_select tag? Thanks, Dave
2008 Nov 22
6
select_month post and params
Hi why is that not working? Controller----------------------------------------------------- def bla month = params[:month_select] redirect_to :action => "index" flash[:error_messages_for] = month.to_s end View---------------------------------------------------------- <%form_tag :action => "bla" do %> <%= select_month(Date.today,
2009 Feb 26
8
beginners question
hi group, I am making a little rails app to experiment with rails. It consists of one model, item, that represents an item on a todo list. A todo item has a description, a state (finished or not) and a due date. After changing the scaffold screens a bit, I wanted to be able to have no due date. I tried to do this by making a radio button; if ''no date'' is selected, the date
2006 Jan 15
4
form inputs resetting on sumbit
I searched for forum for something about this but couldn''t find anything. For example I have this in my view: (you enter start/end dates from dropdowns, pick a category and a report is generated.) <%= start_form_tag :action => ''display_report'' %> From: <%= date_select ''report'', ''date1'' %> <br /> To: <%=
2007 Apr 12
3
Radrails and date in mysql problem
Hi, Im using radrails and mysql database, im using DATE in mysql for a date of birth column, When i use this in Radrails the date shows as dropdown lists, the days and month are fine but the year list only shows 2002-2012. Is there any way of extending the years? as its not suitable for date of birth. Any help appreciated -- Posted via http://www.ruby-forum.com/.
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
2006 Mar 08
5
object.save is not creating an insert statement
I have a model for a task class. When I try to save a task, for some reason no INSERT statement is being generated. Here''s the pertinent part of the development.log: ------------------------------------ Processing TasksController#create_fromProject (for 70.247.24.238 at 2006-03-08 14:20:30) [POST] Parameters: {"commit"=>"Create",
2008 Feb 26
2
Specify HTML options on select_year
Rails 1.2.3 It appears that the select_year helper doesn''t accept HTML attributes as part of the options array. Does anyone have a way to successfully pass an :onchange attribute in to the select_year helper? I''m going to do it with Javascript directly for now. Thanks, Wes -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You
2006 Feb 05
0
How can i specify default time to datetime_select tag
I want to specify a different default time to datetime_select tag how can i do that. also i was looking at rails helper code ----------------------------------------------------------------------- module ActionView module Helpers module DateHelper def to_datetime_select_tag(options = {}) defaults = { :discard_type => true } options = defaults.merge(options)
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 Jul 18
1
Auto-populating time portion of a datetime field from a form
I see that if I use the date_select helper in my view, then in the generated page, my selects are named obj[datetime_field(1i)] (and 2i and 3i for the other parts). These auto-populate the date portion of my datetime_field. I have another datetime field that I''m presenting the time from and I would like to use a similar scheme to autopopulate it. Currently, I''ve used the
2007 Jul 12
3
Agh, this is annoying. Why is this happening?
My problem: Mock ''Task_1005'' received unexpected message :user_id= with (1) No matter what I do to try to stub that out it will still fail out and give me that message. Here is my spec describe TasksController, "handling POST /tasks" do before(:each) do @task = mock_model(Task, :to_param => "1", :save => true)
2008 Jul 10
6
Uppercase all row columns
Hi. I have to convert the contents of all columns to uppercase before creating a row. Is there an easy way to accomplish this so I don''t have to go one column at a time and upcase! it? Thanks. Pepe --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group,
2008 Jun 09
3
Rails 2.1 and ddatetime_select
I''ve updated to 2.1 and am continuing to have issues with datetime_select helpers which worked fine previously. Example: <% form_remote_tag(:url => { :controller => ''notes'', :action => :add_booking_note_ajax, :id => @booking},
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(