Displaying 20 results from an estimated 2000 matches similar to: "Berkeley DB XML Adapter?"
2006 Aug 14
5
Tutorial for Queries
Hi! I''m looking for a good tutorial that explains the main points of
performing queries with Rails. I do have AWDWR and have read the
section on ''find'' but I''m looking for something that goes into more
detail on how to perform queries across tables.
Abstracted from my current application, this is an example:
* person has_many sites
* site has_one room
*
2006 Aug 13
3
escape block using red cloth
Hi all,
Is it possible to configure red cloth to escape a block such as:
------------------------------------------------------------------
Hello, _this_ works *beautifull*
[code lang="ruby"]
def foo
bar
end
[/code]
------------------------------------------------------------------
The text in the [code] block should not be parsed by Red Cloth''s to_html
method.
I cannot
2006 Aug 09
3
rel=nofollow or akismet
Hi guys,
My site ( http://shunya.in ) recently started receiving some spam and I had
ignored the issue till it became a problem, and I guess it is becoming a
problem now.
I looked around on suggested ways to address the problem and found two
systems - CAPTCH and Akismet. I consider both of them in this email along
with the reasons why I am debating using neither of them. Then I ask for your
2006 Jul 29
3
Engines question
I would like to get at all models in a rails application to be able to
add a field to every one of them as part of a migration. Something
like the following:
Appmodels.each { |x| add_column x.table_name.to_s, :foo, :text }
I understand I can get the table name using
ActiveRecord::Base#table_name, but how do I get all the models into an
array that I can use in the above manner?
--
Cheers,
Hasan
2006 Jan 18
2
Migration?
I just installed ruby, lighttpd, and mysql from darwinports on me
laptop in lieu of the Apple version of ruby. Now when I fire up my
rails application, it''s not running lighttpd anymore -- it''s running
webrick. It also exits immediately. MySQL is running, the database
and tables are restored from the backup. What step am I missing?
Thanks for the help!
Cheers,
Hasan
2006 Jan 02
5
How to use MySQL sum() to get total of column?
Easy one: Let''s say I have a table called ''employees'' with a column
called salaries, how can I add Employee.salaries_total to the model?
Thanks!
--
Posted via http://www.ruby-forum.com/.
2006 Feb 01
2
Uninitialized constant ApplicationController?
Hello list,
I''m trying to start my Rails server after doing a long complex switch
from Postgres to MySQL, and I''m getting the following error:
=> Booting WEBrick...
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:200:in
`const_missing'': uninitialized constant ApplicationController
(NameError)
from
2006 Aug 14
1
What fields_for really for?
Hello everyone!
I have 3 models:
=== 1 ===
class Region < ActiveRecord::Base
has_many :districts
end
=== 2 ===
class District < ActiveRecord::Base
belongs_to :region
has_many :suburbs
end
=== 3 ===
class Suburb < ActiveRecord::Base
belongs_to :district
validates_numericality_of :region_id, :only_integer => true
end
In edit.rhtml for SuburbController I need to specify
2005 Dec 14
3
Geocode for Ruby
Hey,
Does anybody know of a good Geocode library for Ruby, similar to Perl''s
Geocode::Postal, that i could use in my rail app? I need to do some "within
5 miles" calculations of zipcodes and i dont have a nice ruby (or gem)
utility to do it.
any help would be appreciated.
thanks
adam
_______________________________________________
Rails mailing list
2006 Aug 05
4
file_column just will not work...
Hello,
I have been trying for some time to get a file to upload using the
file_column plugin.
My code is here: http://pastie.caboo.se/7304
But my code is not the issue. I cannot even pass the unit test that
come with the file_column plugin.
If I run ruby file_column_test.rb i get:
1) Error:
test_store_dir_callback(FileColumnTest):
TypeError: can''t convert Fixnum into String
2006 Aug 04
3
forms and relationships
i''m still pretty new to rails, and while i''ve been able to hack my way
into having it do what i want so far, i''m not happy with the way my code
looks. on top of that, i''m sure that what i''m doing prlly isn''t the most
efficient either.
one of my biggest problems is probably to do with using relationships
and forms together. i''ve
2006 Jan 10
1
Ferret -- Search Partial?
I''d like to implement the search capabilities of Ferret and am
looking for sample code to see how it''s done. I''m thinking my
controller creates the index when "Search" is clicked and a partial
is rendered. What is this partial supposed to look like? Is it built
in to rails/Ferret? Thanks for the help!
Cheers,
Hasan Diwan <hasan.diwan@gmail.com>
2006 Feb 21
6
Select articles from group with id ''1'' and id ''2''
I have to tables: "articles" and "groups". Between I have
article_groups as a jointable. Now I want to select every article who
is a member of group with id ''1'' and id ''2''. Whats best way to get
that?
Extract from schemas:
CREATE TABLE articles (
id int auto_increment,
ingress text NOT NULL,
story_text longtext,
constraint fk_items_users
2006 Aug 18
3
Mysql::Error: Can''t create UNIX socket (24)
Any idea what this means? I have done many google searches and got
nothing?
Any help is greatly appreciated.
--
Posted via http://www.ruby-forum.com/.
2006 Feb 08
2
What page is an item on?
Using the paginator helper, is there a way to determine what page an
item in the collection is on?
Thanks in advance for your help!
2006 Jan 04
3
date conversion
I have the date saved in a database in the following format
''20060102170020''. How do I go about converting the date in the format of
January, 01, 1901? I searched all over and found something similiar
using ''to_formatted_s''. However I only found support for converting
month to a three letter format (e.g. ''Jan''). Is there an eaiser way?
2006 Aug 04
8
I need an idea !
Hello here, I need to find an idea to solve a problem
I manage Events which are of kind :arrival or :departure
At first the two kind of events was unrelated but my client want to see
the :departure belonging to the :arrival and vice versa.
I''m searching for a solution to implement this ''link''. I''ve thought
about an integer column containing an uniq id for
2006 Apr 13
7
Complex SQL in paginate command?
Hi all,
Is there a way to create pagination with a complex SQL, more complex
than the :conditions option will support?
I have two databases, houses and images. Houses has_many images, and
each Image belongs_to house.
I''m creating a search engine for the house records and I''d like to be
able to filter out all the houses without any associated images.
So far I''m
2006 Aug 11
6
Newbie Question -- Override String functionality
Hello,
I would like to add functionality to the String class....where do I do
this?
Do I create a new model (if so, what do I call it?) and put something
like:
class String
def my_new_string_method
blah blah
end
end
Thanks for any pointers.
--
Posted via http://www.ruby-forum.com/.
2006 Aug 02
7
ActiveRecord does not close database connections?
I have an application that creates quite a few threads. I keep getting
the "mysql too many connections" error.
ActiveRecord does not close the connection once a thread had died out.
To make things worse mysql has a wait_timeout variable that would
basically kill off these connections for me, but there is a bug and I
can not change the value of it. I have tried at least 10 different