Displaying 20 results from an estimated 1000 matches similar to: "select_month post and params"
2010 Jul 26
1
form date helper with text year
I have a date where the year range is more then I want to define in a
select_date scaffold generated year range.
My idea was to have the year entered as a text field and the month and
day using something like:
<%= select_month @person.born,:prefix => :person ,:field_name =>
"born(2i)" %>
<%= select_day @person.born,:prefix => :person , :field_name =>
2006 Mar 21
5
Use select_date for my model?
Hi all
I have a model "party" that has a time field "starts_at". I have created
a form to add new instances of this model.
<%= select_date Date.today, :prefix => ''party'' %>
Sadly I get the error:
NoMethodError in Parties#add
undefined method `month='' for #<Party:0x256a600>
How can I fix this problem? I remember that I saw in
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
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 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 Jul 02
1
DRY? Why select_date and select_date?
Why select_date and select_date?
I dont understand why having both (backward compat?).
I also look that their source are different, one use the InstanceTag
and others calls 3 select_(year, month, day) functions.
2006 Dec 08
4
select_date method
Hi Everyone,
I used "select_date" method in my application and got 3 select boxes
for Date, Month and Year.
Code :
<td><%= text_field ''content'', ''title'' %></td>
<td><%= text_field ''content'', ''description'' %></td>
<td><%= select_date %></td>
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 26
2
DRY up selects in view
Here''s what I''ve got:
<% @fields.each do |field_name| %>
<tr>
<td>
<%= field_name.humanize %>
</td>
<td>
<% unless field_name =~ /_id$/ %>
<%= form.text_field field_name, :size => 40 %>
<% else %>
<%= select(:vendor,
field_name,
State.find(:all, :order
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
2006 Feb 02
5
access controller var within model
I need to access params[:field_name] from within my Model.
@params[:field_name] isn''t working?
2006 Feb 28
2
Most Popular Searches
Hi,
I have an index where each document contains an untokenized ''url''
field. I would like to query the index for the most popular urls. In
SQL I would do this via a Group By clause. Is there anything in
Ferret that will do something similar?
I found this discussion that proposed a solution involving TermEnums:
2008 Jul 04
4
Routing and Parameters
Greetings. I have a route something like this:
map.calendar ''/tasks/:year/:month'',
:controller => ''tasks'',
:action => ''calendar'',
:year => /\d{4}/,
:month => /\d{2}/
(Ignore the obvious problems of invalid data.)
I''m trying to create a form that will allow my users to navigate from
one month/year to the next.
2006 Nov 02
5
Adding fields to a form
Is there a decent way to add a field to a form before posting it? I
haven''t tried using HPricot manipulations just yet, since I can''t
ever find really solid docs on hpricot....
Form#[]= doesn''t work because it first searches only pre-existing
fields. I''m investigating how to write a patch now.
But I thought maybe someone here might have an idea.
2015 May 25
1
Changing from Interal DNS to Bind9
Hi,
I am playing arround with a Samba4 at the moment.
I had a running AD with Samba4 and the Internal DNS.
I tried to change the DNS to Bind9.
When i start bind9, i get the following error in the /var/log/syslog
May 25 12:42:54 masnyjg named[1383]: starting BIND
9.9.5-3ubuntu0.2-Ubuntu -u bind
May 25 12:42:54 masnyjg named[1383]: built with '--prefix=/usr'
2015 Jun 20
1
Xapian with Json
Hi !
I?m newbie with Xapian !
I?m looking for the best way to index json data to be able to search by name/value pair and Full Text Search using only Xapian.
I did haven?t success to found a complete or a good documentation about json index and search.
Do you know some documentation about ?
Another problem that I have is that: In the same name/value pair sometimes I have different data types
2006 Oct 05
4
search results autocompletion
Dear list,
I ''m using a text input field with autocompletion . The suggestions come
from a ferret index which is created by getting all the terms belonging to
other indices. Here is the code:
class Suggestion
attr_accessor :term
def self.index(create)
[Person, Project, Orgunit].each{|kl|
terms = self.all_terms(kl)
terms.each{|term|
suggestion =
2006 Mar 21
5
Getting a time select input
I''m having trouble workign out which ActionView DateHelpers to display a
time input for an ActiveRecord field of type :time.
I just want an hours input and a minuites input. I can get these with
time_select helper using :field_name and :prefix but it gives both hours
and miniutes the same name.
<%= select_time(Time.now, :prefix => "search", :field_name =>
2005 Aug 15
1
html_options for select_date
As far as I can tell, it''s not possible to use html_options in
conjunction with the select_* helpers.
This means using them in conjunction with observe_field etc is pretty
much impossible.
Does anyone have a patch to add this functionality, or know of a workaround?
I''m having a look at the moment, but not sure how to get it working
without breaking existing stuff.
--
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