Displaying 20 results from an estimated 5000 matches similar to: "Questions on ActiveRecord implementation"
2006 Jun 14
7
CR issue
Hi,
I am using RedCloth (3.0.4).
First using online text2html (http://www.textism.com/tools/textile/) ,
"123
456"
returns <p>123<br />456</p>
But by code:
<code>
require ''RedCloth''
puts RedCloth.new("123\n456").to_html
</code>
I got:
<p>123
456</p>
CR is not taken in consideration. Is there any parameter I am
2006 Jun 11
6
page.update_html not executed
Hi,
when doing:
render :update do |page|
page.replace_html ''suggested_contractors'', :partial =>
''contractors''
page.visual_effect :highlight, ''suggested_contractors''
end
I got js as output, it is not executed, return html *contains*:
try { Element.update("suggested_contractors", "
\n 12345678910\n
\n
2006 Jun 16
6
rendering mathematical equations
Any recommendations on how I can get mathematical equations into my
resulting html? (Besides using x^2^ type markup.)
I figure I could parse out equation text from my main text before
RedCloth ever sees it... and then maybe create png''s somehow from it,
putting the links to them back into the main text before handing it
over to RC. But I don''t know of a util that will generate
2006 Mar 31
3
undefined method `<=>'' for :id:Symbol
Upgrading to 0.9.0, I have the following error. Anybody?
c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.0/lib/ferret/index/term.rb:35:in
`<=>'': undefined method `<=>'' for :id:Symbol
(NoMethodError)
from
c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.0/lib/ferret/index/term_infos_io.rb:263:in
`get_index_offset''
from
2006 Aug 06
2
TextMate + Rails
Hi,
Could anyone point to some TextMate resources ? I found a few bundles,
but they were all corrupted...
JEtienne
--
Posted via http://www.ruby-forum.com/.
2006 Apr 25
3
Migrating to 0.9.1
After migrating to 0.9.1, I got:
usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:123:in
`const_missing'': uninitialized constant TokenFilter (NameError)
Here is a snapshot of my code:
...
require ''ferret''
class MyFilter < Analysis::TokenFilter
...
I works fine on my dev machine, but not a production server (shared
host).
Any
2006 Aug 04
2
Generating RTF documents?
Hi,
I need to implement some RTF export for a customer. According to some
"templates", i generate RTF documents, filling data coming from models.
It''s pretty much like a mailmerge, but in *nix/ruby world.
Also, customer would like (in the future) to upload himself the
templates, so he can modify them by his own.
Can anyone advice me on an elegant solution?
Thank you,
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
2007 May 25
7
Storing large BLOBs in the database with ActiveRecord
I have a model called Product with an attribute called file of
type :binary (DB BLOB). If I do product.save (where product is an
instance of my Product model), here is SQL statement that the mysql
adapter for Ruby will do:
INSERT INTO `PRODUCT` COLUMNS(NAME, PRICE, FILE) VALUES(''PROD1'',
4.56, X''00DEF033423023220'')
All is hunky dory for as long as my BLOB is
2006 Jun 30
3
AR: Model on several tables
Hi,
Is it possible to have a Model where columns are not in one table, but
two tables?
Jean-Etienne
--
Posted via http://www.ruby-forum.com/.
2007 May 28
2
out-cheat validates_uniqueness_of
before_save :strip_strings
validates_uniqueness_of :username
validates_presence_of :username
private
def strip_strings
self.username = username.gsub!(" ","")
end
example:
username = " gissmoh-/upiLifMog2ELgA04lAiVw@public.gmane.org "
becomes gissmoh-/upiLifMog2ELgA04lAiVw@public.gmane.org
and is stored in the
2005 Nov 07
5
Switchtower deployment
Hi,
Has anyone experiences using SwitchTower (Windows) in a shared hosting
environment (Textdrive)? I already patched the SwitchTower rake tasks (I
don''t know if someone is interested on it), but i still experience some
problems (not in the sudoers list, ...).
Thank you for answer (and thank you to the textdrive guys, i never had a
such fast support!)
--
Jean-Etienne Durand
2006 Jul 18
2
RubyOnRails certification
Hi,
I am just wondering if there are already some ROR certifications, and if
yes, what is the rails core opinion?
Thank you
Jean-Etienne - http://www.novAgora.hu
--
Posted via http://www.ruby-forum.com/.
2006 Jun 12
2
date_select() in collection
Hi,
I am doing the following:
<% obj.contracts.each do |@contract| -%>
...
<%= hidden_field("contract[]", :contractor_id, :index =>
@contract.contractor.id) %>
<%= date_select("contract[]", :starting_on, :index =>
@contract.contractor.id) %>
...
<% end -%>
Here are the request parameters:
{"commit"=>"Save",
2006 Jul 20
7
How do you use :message with validation?
If I do validates_uniqueness_of :name, :message => "It''s not
uniqueeee!!!"
then how do I have it display that message when the check fails?
-Ben Lisbakken
--
Posted via http://www.ruby-forum.com/.
2006 Aug 03
3
HELP: multiple select list in ror
Hi
Search doesn''t seem to be working so my apologies if this has come up
before.
I have some simple code in a view that generates a multiple select:
<select name="menu_select" size="5" multiple="multiple">
<% for m in Menu.find(:all) %>
<!-- this needs to be abstracted in ror fashion -->
<option value="<%= m.id %>"
2006 Mar 24
9
Escaping characters
Hi,
I am writing some help about post formatting. I am using redcloth to
format the text, and in a FAQ, also formatted with redcloth, I explain
what to type to what to obtain.
So, how could I escape ''*'', ''#'' & Co, to have an output like
<redcloth>
Type *word* to obtain <strong>word</strong>
</redcloth>
I tried "Type
2006 Jul 20
3
acts_as_tree
Hello,
I''m trying to create categories that have their own subcategories, and each
subcategory may have its own subcategories, .. and so on.
After some reading, I found out that the best way for creating such a thing
is to use acts_as_tree, but I didn''t find any tutorial or article that
explain this in a clear way. After a lot of work I was finally able to
create categories and
2006 May 25
1
schema_info not updated
Hi,
When doing a ''rake migrate'', schema_info is not updated (it does not
contain any row). Migration is done properly the first time, but fails
the second time I run it, since there is no info in schema_info.
I am running rails 1.1.2, using script/generate migration to generate
the migration file.
Any help? Thank you.
Jean-Etienne
http://www.novAgora.hu
--
Posted via
2006 Sep 11
5
WebServices & controllers
Hi,
I am having problems with REST web-service support.
I have a simple controller:
class DocumentsController < ApplicationController
wsdl_service_name ''Documents''
web_service_api DocumentsApi
web_service_scaffold :invoke
def list
@docs = Document.find(:all)
respond_to do |wants|
wants.html
wants.xml { return @docs .to_xml }
end
end
end