Displaying 20 results from an estimated 4000 matches similar to: "Collection has next question"
2006 Mar 30
2
acts_as_ordered plugin
Hey all,
I''ve just put together a little plugin to easily access the neighbours of a
given model in a particular order. Read on if interested.
Install:
script/plugin install
http://svn.viney.net.nz/things/rails/plugins/acts_as_ordered
Usage:
class Person < ActiveRecord::Base
acts_as_ordered :order => ''first_name''
end
Say you have people with first
2006 Aug 09
10
Next/ Previous record
Hi, Quick question (which means that I think there should be an easy
answer)...
When I am in the "show" view, I''d like to add 2 links, one for previous
and one for next record so that the user can go on to the next "result"
without having to go back to the ''list'' of results. However, I can''t
find my way about this problem :-S
2007 May 01
3
ActiveRecord Previous/Next Record
Does ActiveRecord offer a simple solution to get previous/next records
relative to a certain record? For instance, say I have this table:
PEOPLE
id | name
1 | john
2 | mary
3 | bob
Using p = Person.find(2), is it possible to get the previous (john)
and next (bob) records using perhaps something like p.previous and
p.next? If not, how can I do this without resorting to ugly queries?
Thanks in
2006 Aug 02
9
How to fetch the previous or next record
Hello,
Is there some built-in facility for fetching the Previous or Next record
from a table? Assume the command find_by_name has been issued, and the
variable @name contains the name "John Doe". I''m looking for something
like find_next(@name) and find_previous(@name). What''s a good way to
pursue if one has to roll their own methods?
Thanks for the help,
gk
--
2006 Jul 02
1
acts_as_modified, acts_as_ordered and validates_date_time
A quick note about acts_as_modified, acts_as_ordered and validates_date_time.
If you are using any of those plugins you should update them. They''ve
all had improvements/bug fixes.
Also, acts_as_modified is now being maintained by both Chris Hall and myself.
http://svn.viney.net.nz/things/rails/plugins/acts_as_ordered
http://svn.viney.net.nz/things/rails/plugins/acts_as_modified
2006 Aug 16
3
Validate your forms with a table-less model
Ive followed this example of how to validate a form with a tableless
model:
http://rails.techno-weenie.net/tip/2005/11/19/validate_your_forms_with_a_table_less_model
Ive got this example working but when validation fails the failed boxes
are not highlighted in red. At the moment i have a contact details form
and want to validate the information entered by the user but this will
just result
2007 Feb 17
5
render collection with index
Is there any method for getting the current iteration (for changing row
colors) in the category partial?
<%=render(:partial => "category", :collection => @categories)%>
thanks,
andy
--
Andrew Stone
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post
2017 Dec 02
2
idamp ad/rid
Found it! :)
I thought in make a script more or less that way.
#!/bin/bash
#
GROUP=ADM
GUID=10000 # Domain Users
UID=10000 # get the next ID ?
for USER in $(samba-tool group listmembers $GROUP)
do
samba-tool user edit $USER -H ldap://samdom.example.com \
-U administrato --nis-domain=samdom \
--unix-home=/home/$USER \
--uid-number=${NEXTID} \
2017 Dec 02
2
idamp ad/rid
On Sat, 2 Dec 2017 10:21:07 -0200
Elias Pereira <empbilly at gmail.com> wrote:
> Correcting! :)
>
> #!/bin/bash
> #
> GROUP=ADM
> GUID=10000 # Domain Users
> UID=10000 # get the next ID ?
>
> for USER in $(samba-tool group listmembers $GROUP)
> do
> samba-tool user edit $USER --nis-domain=samdom \
> --unix-home=/home/$USER \
>
2008 Apr 16
3
Linking to "Next Entry >>" from the current Entry Page
Hi all,
I''m trying to link to the "Next Entry >>" from the current entry page
(in show.html.erb).
Any one know how I would do it?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send
2008 Dec 10
3
How to fix broken ogg/theora files
Hi there,
I haven't been on this list until now, so I wasn't aware of this problem until last night ;-) - sorry for that.
I am working on a patch for oggCut for that issue (looks good actually but I would like to do some testing befor I can release a patch.)
Normal players are not effected by the page time misordering, so I took this issue as "minor". The reason for the
2006 May 03
1
nil.strip error While trying to post xml data over https.
I am trying to subit some xml data over https to access an API. My code
so far seems to generate a very non-helpful error in the guts of the
net/http library. This code produces a NoMethodError for nil.strip"
require ''net/http''
require ''net/https''
require ''uri''
url =
2006 Apr 20
5
Integrating with Legacy Databases
This seems like it must have been asked before - I really _did_ try to
find it in the archives, so my apologies if it''s already out there.
Utilizing ActiveRecord, I would like to specify a prefix for the
column names in my table. For example, in ''Recipe 16 Integrating with
Legacy Databases'' (Rails Recipes, from PragProg, by Fowler) they deal
with integration with a
2017 Dec 02
1
idamp ad/rid
On Sat, 2 Dec 2017 12:13:08 -0200
Elias Pereira via samba <samba at lists.samba.org> wrote:
> >
> > Sorry, but that isn't going to work with 'samba-tool user edit'
> > You would need to write an 'editor' script to do what you would
> > need to do.
>
>
> Ok.
>
> Bit busy, just now, give me some time, I have a script somewhere that
2006 Jun 11
7
testcase_setup_and_teardown_with_blocks (aka "The plugin with the very long name")
Hey all,
I got annoyed recently that I couldn''t specifiy multiple chunks of
test setup and teardown code that get executed for each test. You''re
currently limited to just one setup method (unless I''m much mistaken).
Anyway, I just wrapped up my solution in a plugin. The answer: use
blocks!
class Test::Unit::TestCase
# This is overridden by the subclass and will
2006 Mar 23
5
validates_dateness_of ?
Hello all.
I don''t suppose some enterprising soul with much more skill than me has
whipped up a "validates_dateness_of" (Complete with leap year
calculations) method for use with all the other validation methods and
wishes to spread much much joy?
Cheers
Jeff "I can barely code RoR and rely on others to do the hard work"
Jones
--
Posted via
2006 May 19
5
How to determine if an object has just been created
Is there a built-in way to determine if a model object has just been
created (ie. this object was the one that was originally persisted)? I
can''t see it anywhere in the AR code, but thought I''d check. I want
something like:
p = Person.create
p.original_instance? # true
Is this built-in or should I just patch AR?
-Jonathan.
2009 Mar 09
1
lme anova() and model simplification
I am running an lme model with the main effects of four fixed variables (3
continuous and one categorical – see below) and one random variable. The
data describe the densities of a mite species – awsm – in relation to four
variables: adh31 (temperature related), apsm (another plant feeding mite)
awpm (a predatory mite), and orien (sampling location within plant – north
or south).
I have read
2011 Mar 08
2
Comment creer un formulaire maitre-detail
Salut a tous!
Est-il possible de creer un formulaire maitre-detail?
J''ai besoin de creer une fenetre ou l''utilisateur rentre un commande et
les differents produits associaes a cette commande.
Puis-je afficher le tout dans une seule page? Faut-il un minimum de 2
pages
Comment visualiser le detail de la commande avec tous les produits
commandes, et l''imprimer si
2006 May 25
5
Is there a way to abstract the updating of other parts of the page after an Ajax request without putting using the standard view file?
Hey all,
I''d like to abstract the process of updating different portions of the
page after an Ajax request has taken place. Rather than simply putting
the extra view logic in the standard rjs template, it seems to give
better separation if there is a split between the core view logic (ie,
inserting a row in a table), and updating any associated portions of
the page.
Is this possible? I