Displaying 20 results from an estimated 300 matches similar to: "Getting 22 elements"
2006 May 28
3
Working with topics and categories
Hello guys,
I''m a newbie in RoR and I have a problem. My DB structure is
======================================
topics table : id(int,11)
name(varchar,255)
categories : id (int,11)
topic_id(varchar,255)
name(varchar,255)
======================================
--Models:--
class Topic < ActiveRecord::Base
has_many :categories
end
class
2006 Jun 29
1
Ruby on Rails, Ruby and CGI
Hello guys,
Usually, I write web apps on mod_perl2+Mason, but I get involved on
RoR...
Can I write Ruby and/or RoR apps without CGI?
Thanks.
--
Posted via http://www.ruby-forum.com/.
2008 Jan 01
7
in_vertical_groups_of
Hi all,
Here''s another contribution for anyone interested.
In Railscast episode 28, Ryan Bates showed us in_groups_of which
allows you to group array members such as
>> list = [1, 2, 3, 4, 5, 6, 7]
=> [1, 2, 3, 4, 5, 6, 7]
>> list.in_groups_of(3)
=> [[1, 2, 3], [4, 5, 6], [7, nil, nil]]
This allows you to iterate over the groups and, for example, display
a list
2006 Aug 09
3
select with country names
Hi,
I need to create a list of coutries in a driop down.
I''m aware of a function ''country_options_for_select'' however this jsut
seems to output a string of all countires.
How can I get this list in a drop down?
Thanks
scott
--
Posted via http://www.ruby-forum.com/.
2004 Sep 07
3
DTMF Caller ID w/o polarity inversion
Hi Folks,
I've been looking around and found some references of some Caller ID
patches (Mantis bug#9) for X100P and TDM400 for Netherlands, Sweden
and UK. It's been quite hard to understand what has finally been
incorporated to the distribution (if anything) or which patches must
be applied in witch snapshot of the repository.
I've tried some different approaches but nothing worked
2006 Jul 20
11
3 columns
Hi all,
Not really sure what to put in the title so hope people still open this!
What I want to do is produce something like this
Col1 Col2 Col3
data1 data2 data3
data4 data5 data6
data7 data8 data9
data.. data.. data..
data.. data.. data..
data-n data-n+1 data-n+2
I can get the data back from my db
2009 May 27
4
Scaffolding Results Format
Hi Everyone,
I built a scaffold and I''m having trouble getting results properly
formatted. (I need to get the data into multiple columns instead of just
one big column) I can''t get all of my CSS to work properly in
scaffold.css, layout/books.rhtml, or the books/index.rhtml.erb Anyways,
maybe you have a suggestion.
Default view (127.0.0.1:3000/books)
Title Abstract
2006 Apr 09
6
Write/Display AR query as Grouped Results?
I''ve got a publications table that contains an author_id foreign key and
a pubrole_id foreign key. What I want to do is query the DB using AR so
that I can get a list of all publications that belong_to a particular
author, and group the results by the pubrole.role_name (Author, Joint
Author, Editor, etc.) so that the results look something like:
Author
book1 info
book2 info
etc.
2009 Mar 08
1
Working with in_groups_of
I''m trying to build a table out using in groups of, but I''d also like to
be able to customize the first and last rows.
Apart from the actual formatting, is there an efficient way to figure
out how many total groups there are and what group the iteration is in?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this
2006 Jul 19
1
Displaying data in a table
I''m trying to display a series of pictures in a table. Rather than just
house each of the pictures in separate rows, I''d like to have 5 pictures per
row. So, basically after I iterate through five columns in my table, I need
to start a new row and show the next 5 pictures.
Could someone help me with the looping structure I''d need to create to do
this?
Thank you!
Sarah
2006 May 03
2
grouped output
hello,
Suppose I have a table that looks like this:
center name email
Health Jon jon@test.com
Health Bob bob@test.com
Admin Jane jan@test.com
Admin Jill jill@test.com
I would like the output to look like this:
Health
Jon jon@test.com
Bob bob@test.com
Admin
Jane jan@test.com
Jill jill@test.com
when i using cold fusion, this was easy via a tag called cfoutput.
when i was using java, this was
2010 Oct 15
3
Noughts and Crosses layout with a variable number of entries
I have a product listing of 9 per-page. The products on the far right
and bottom row should NOT have a border on the aforementioned sides. So,
similar to a noughts and crosses layout. However, pages do not always
have 9 products to display.
You may have a better understanding if you see the code I''m currently
using: http://pastie.org/1223260
The code above is passed inside a block and
2003 Aug 06
9
R2 support
Hi folks, where can I find the R2 beta code for Asterisk?
Best,
PauloHM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20030806/9c7a0660/attachment.htm
2017 Mar 27
2
Adding SIG info to mirror list
Hello,
I was looking for AltArch Rsync mirror somewhere in the Nordic and it is
somehow hard to find.
Mirror list at https://www.centos.org/download/mirrors/ shows the
available HTTP/FTP/Rsync mirrors, but there is no information if the
mirror provides other content than the CentOS repository itself.
Would it be possible to have additional information like if the AltArch
(and others)
2008 Aug 25
21
How much test data to use in specs
I''m not sure how much test data I should be using in my specs. I''m
writing specs for the Property model in my Rails app. Its "address"
attribute is going to be validated with this regex:
/\A\d+[a-z]? [-'', a-z]{2,128}\Z/i
At the moment, my plan is to spec out the following possibilities. A
property is invalid if its address:
1) doesn''t begin with
2006 Aug 11
1
Group By
Hi,
I have a table similar structure below.
id name position page
1 name1 1 1
2 name2 2 1
3 name3 3 1
4 name4 1 1
5 name5 1 1
6 name6 1 2
What i want is to select all the items for a given page number grouped
by pos and displayed in a view using a loop like:
display position number, number of records
for
2009 Jul 08
2
RuntimeError (JPEG marker not found!):
Hi,
while generating the PDF file , i am getting following error..
please help for me.
RuntimeError (JPEG marker not found!):
C:/Ruby/lib/ruby/gems/1.8/gems/pdf-writer-1.1.8/lib/pdf/writer/
graphics/imageinfo.rb:176:in `
measure_JPEG''
C:/Ruby/lib/ruby/gems/1.8/gems/pdf-writer-1.1.8/lib/pdf/writer/
graphics/imageinfo.rb:174:in `
loop''
2006 Apr 25
6
SQL WHERE equivalent in rails
What is the equivalent of the WHERE SQL condition in rails?
I''m thinkin this could be something like:
<% for product in @products where category="1" %>
but obviously the syntax is wrong.
--
Posted via http://www.ruby-forum.com/.
2009 Mar 27
1
using pagination to group pages by attribute value
Hi -
I''m trying to group records based on some attribute they or an
association of their''s have. The simplest example I could think of to
drive my point is this:
Assume the following model associations (pardon my butchering of rails)
-
Faculty has_many :courses
Course belongs_to :faculty
I want to paginate courses based on the name of the faculty they belong
to.
The paging
2003 Jun 08
10
VoIP Provider
Hi,
I am just about to move out from my parents home and think about how I
will phone from now on. In Germany there is a provider (QSC) who
offers DSL (1024 down/256 up) with fastpath without volume or time
limits.
Does anybody know a comercial (or even semi-professional) provider who
lets me dial out through H323 (or another protocol) and also offers an
number where I can be called from