Displaying 20 results from an estimated 400 matches similar to: "Error in tutorial or sintax changed?"
2005 May 17
5
Strings, Variables and GetText
Hi,
I''m starting to use GetText and have this code:
render_text %(<script language="JavaScript" type="text/javascript">
parent.mainframe.onUpdateNew("Gallery <b>#{@media.name}</b> was
successfully created.",
"#{@media.name}","#{String(@media.id)}","#{@media.media_type}");
</script>)
I need to convert
2005 Jul 27
1
Upload Progress, Error in Ajax.PeriodicalUpdater
Hi,
I''m using Upload Progress class of rails and geting this javascript
error in js console:
"*Ajax.PeriodicalUpdater is not a constructor*"
The view have somethink like:
<%= form_tag_with_upload_progress( {:action => ''create_gallery''},
{ :name => ''new_gallery'',
:begin =>
2011 May 20
3
How to handle non model data in form?
Hey,
I got a form which looks like this:
- form_for(@article, :html => {:multipart => true}, :url =>
articles_path) do |f|
= errors_for(@article)
.field
= f.label :text
%br
= f.text_field :text
.field
= f.label :author_id
%br
= f.text_field :author_id
.actions
= f.submit
But since I don''t want anyone to type in an author id I changed it
2005 May 10
6
How not to use AJAX
Hi all,
Just ran across this article
http://blog.taragana.com/index.php/archive/how-not-to-use-ajax/
and was curious what the consensus is on the bookmarking and search
indexing problems. I remember seeing something about bookmarking on the
list. Thanks,
Ben
--
Ben Jackson
Diretor de Desenvolvimento
INCOMUM Design & Conceito
ben-p14LI7ZcAE/pVLaUnt/cCQC/G2K4zDHf@public.gmane.org
2008 Jan 15
7
PHP indexing, what's the PHP method for indexscript
Currently I have the following indexscript:
pid : unique=Q boolean=Q field=pid
postdate : field=startdate
author_name: unhtml boolean=XAUTHORNAME field=author
author_id: boolean=XAUTHORID field=authorid
url : field=url
sample : weight=1 index field=sample
How can I create the same indexing using PHP?
With this, I can get an searchable index, but I have no idea how to set the fields, so that I
2006 Oct 19
3
joins and table names in ferret
I''m having trouble figuring out how to do Ferret queries across multiple
tables as you would in a normal SQL call. For example, let''s say I have
two ActiveRecord classes, Book, and Author, where Book has a
''description'' field and Author has a ''name'' field, and where Book has a
belongs_to relationship with Author (Book belolngs to Author,
2005 Jun 08
7
Rails/lighttpd: Changes to controller not being seen?
This is a weird one:
My app works fine on our local box with webrick. After uploading to TxD
server, the app starts behaving weirdly. I make some edits to one of
the controllers and my changes don''t seem to be going through. So I go
ahead and change the name of the controller file. The page loads
without error. I figure maybe I''m in the wrong directory, so I change
the
2006 Feb 17
7
Rich Text Editor (RTE)
Hello,
We are developing an commercial application that need to use an RTE.
Someone know one RTE editor that can I use in an commercial application?
We need basic functions to format paragrapher, bold, italic, ...
I found FCKEditor but it is very expensive and weight.
I found this list too but don''t know what is trustful:
http://www.geniisoft.com/showcase.nsf/WebEditors
Some
2005 May 29
0
validates_length_of && validates_presence_of: Duplicate error messages?
validates_presence_of :login , :on => :create, :message => "Please
enter a login."
validates_length_of :login, :within => 3..40, :message => "Login must
be a minimum of 3 characters."
Right now if the login field is left blank, both these errors get
thrown. I assume that setting a conditional for the first one if the
second one is thrown, something like
2005 Jun 24
0
lighttpd - sporadic mysql errors
I''m getting a strange error in the production.log (I''m on a TxD shared
server). The first entry is a successful request from right after
restarting lighttpd and killing all the procs, the second is the error
after accessing the site half an hour later without having changed
anything. Restarting lighttpd resolves the issue. What might be going
on?
2005 Aug 18
0
Vitalsource - what are the potential applications of this?
If you haven''t seen Vitalsource (http://www.vitalsource.com), take a
look at it. Very cool stuff, apparently they''re putting a native GUI
frontend on their Rails app.
What kinds of possibilities does this open up?
___________________
Ben Jackson
Diretor de Desenvolvimento
ben-p14LI7ZcAE/pVLaUnt/cCQC/G2K4zDHf@public.gmane.org
http://www.incomumdesign.com
2006 Jun 16
6
Drag and Drop work in IE?
Please,
I''m build an drag and drop tree using scriptaculous and it is perfect in
FF but when I test in IE don''t work, I drag the element and when I free
the button the element don''t go to the place, stay in the mouse pointer...
What can do it happen? I''m using last version of scriptaculous.
Thank you,
Pedro
2009 May 24
6
belongs_to not saving foreign key
Under Rails 2.3.2 using a completely brand new project, I have 2
models:
class Author < ActiveRecord::Base
# name:string
end
class Book < ActiveRecord::Base
# title:string
belongs_to :author # author_id
end
And a simple test where i create a Book with an Author using the
belongs_to and then update the foreign key directly:
require ''test_helper''
class BookTest
2006 Jan 08
22
Putting it all in one place with Schemas
I''m still relatively new to ROR, but I like what I see with the
database-neutral approach of Schemas. In the spirit of keeping it
simple and minimizing the number of files and location of information,
does ActiveState currently allow me to go ahead and place other low
level model information such as validation requirements and associations
inside the schema rather than putting it in
2006 Mar 31
2
A.R. Associations problem
Hello,
I''m learning A.R Associations by creating a simple forum that consists
of 3 tables: ahuthors, topics and posts. This is the schema:
class AddAuthorAndTopicAndPostTables < ActiveRecord::Migration
def self.up
create_table :authors do |t|
t.column :username, :string
t.column :email, :string
t.column :created_on, :datetime
end
create_table
2006 Jun 13
6
Dead horse: validates_associated
Regarding validates_associated...
Let''s say I have:
article belongs_to author
But for whatever reason, I want an article to also be written
anonymously and therefore not require an author. Then I have:
Article:
belongs_to :author
validates_associated :author
But I DON''T have validates_presence_of. What I want to do is validate
that an author is valid --if it is
2006 Jun 30
5
If / Else Form layout question.
Hello all,
I''m using the following _form.rhtml layout for a number of pages,
including edit record and new record (which each has it''s own definition
in the controller).
I''d like to display a different author form field depending on which
page they are using. I''d rather keep using _form.rhtml as a layout
template, instead of customizing each separate page.
2005 Jun 21
3
dynarch calendar problem when used with ajax
I''ve got a partial with a form using the dynarch calendar
(calendar_field behavior). Working.
Now I render this partial from the action specified in to a link_to_remote.
Now when I click the calendar it''s not showed anymore.
theese lines:
<%= stylesheet_link_tag ''calendar-system.css'' %>
<%= javascript_include_tag ''calendar'',
2006 Jan 22
11
ActiveRecord find
Suppose I have three tables - authors, posts and topics.
Every post have a topic and every topic has an author, so I have
posts.topic_id and topic.author_id. When the author is guest (not
registered), author_id is nil.
I need to find all the posts (in one query) where every post have all
the information of the topic and the auther, so if p is one of those
posts I could get the name of the
2008 Jan 10
2
Getting results matching with an array?
I have an array authors=[1,3,7] and I want to get all the posts that
match with any or all of these results.
something like...
posts = Post.find(:all, [:conditions => ''''author_id = ?'', authors])
of course this wont work but I need something like it that works..
thanks
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~