Displaying 20 results from an estimated 1000 matches similar to: "Making link_to use the routes I define"
2005 Oct 21
8
Wrong number of arguments (1 for 0) on routes.rb
Hi,
I''m baffled by this error. I need a simple controller to send e-mails,
so first I thought about just creating the controller manually (without
using script/generate), since that didn''t seem to work, I created a
dummy table in my DB and used the usual procedure to generate scaffold code.
Then I modified the controller to have only two methods, send and compose:
class
2007 Jun 17
1
actionmailer & picture
Hello
I''m using action mailer to create an HMTL outbound email. This email
renders a partial. In that partial, a call is made to a public location
to get a picture for display in the email.
When this email is generate, I get the following error (note: I''m sure
it has something to do with not understanding the context of
actionmailer and how it functions):
NoMethodError in
2005 Oct 07
2
Some Ruby code help?
Hi,
This isn''t related to Rails itself, but rather to Ruby. I''m trying to
import a file into a database. The fields are separated by a ''|''.
Everything seems to work fine, but after 64 rows are inserted, it starts
mangling the field values. Would you take a look at the following code?
require ''mysql''
def capitalize(str)
2008 Jul 20
2
Filtering results through URL (e.g. new?forum_id=3)
Is there a special code you have to place in the routes so filtering
results through the URL works?
For example, Ruby Forum does it with:
http://www.ruby-forum.com/topic/new?forum_id=3
http://www.ruby-forum.com/topic/new?forum_id=5
http://www.ruby-forum.com/topic/new?forum_id=7
etc.
Any ideas?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You
2006 Aug 06
5
Return only results that user is allowed to see?
Is it possible with acts_as_ferret to somehow restrict the results that
are returned?
For instance, I don''t want to return results that are logically deleted
with acts_as_paranoid (deleted_at IS NOT NULL and deleted_at < now()).
Also, if a user is not an Admin, they should not be able to return
results that have a certain value in a certain column, like forum_id !=
13 (if 13 is
2006 Feb 06
1
template choice error (layout.rb)
Hey,
I installed the rjs plugin yesterday and started using it for one set
of views. Today I notice that in an entirely separate
controller/template I''m seeing this error:
TypeError (can''t dup NilClass):
/vendor/plugins/javascript_generator_templates/lib/add_rjs_to_action_controller.rb:41:in
`dup''
2006 Jun 08
2
Activerecord Update syntax.
This what I have - sadly, it does not work :( .
posts = {params[:topic][:forum_id] => { "posts_count" => "posts_count +
@topic.posts_count"}, @topic.forum_id => { "posts_count" => "posts_count
- @topic.posts_count" } }
Forum.update(posts.keys, posts.values)
It''s suppose to subtract the posts_count from topic, and add it and
subtract
2015 Aug 01
2
OT - parted guidance
parted fs resize is deprecated.
http://savannah.gnu.org/forum/forum.php?forum_id=6837
parted fs move can only move a partition into free space
https://www.gnu.org/software/parted/manual/html_node/move.html
The thing to do here is use gparted live or Fedora live media and
yum/dnf install gparted. It has a move/resize option that will do what
the OP wants.
Chris Murphy
2006 Feb 13
4
FreeMIS 1.0 Released
FreeMIS is an open source management information system for schools, built
with Ruby on Rails. I haven''t come across any other big open source
projects using Rails so far - if nothing else, the availability of the
source code might be useful for learners looking for ideas?
If anyone would be interested in helping to develop FreeMIS, please get in
touch.
Details here:
2007 May 02
4
Wrong total_hits when using conditions in find_by_contents
In my model Topic:
acts_as_ferret({ :fields => {:username => {:store => :yes, :boost =>
30}, :subject => {:store => :yes, :boost => 20}, :body => {:store =>
:yes, :boost => 10}}, :remote => true }, { :analyzer =>
Ferret::Analysis::RegExpAnalyzer.new(/./, false) })
def self.full_text_search(q, options = {}, find_options = {})
return nil if q.nil? or
2006 Feb 03
2
acts_as_tree counter_cache behavior is different than API docs
Before I file a ticket, I''ll query ya''ll about this:
The API docs for acts_as_tree''s counter_cache is to create a database column
called "children_count" to hold the counter_cache. I have enabled this
option in my model. While writing tests I wrote a test for creating children
from the a parent:
message = @forum_message["parent"].find
child =
2006 Oct 25
4
need help on special HABTM relation
hey all,
I have three tables like this:
forum (id,title)
usergroup(id,title)
forum_perms(usergroup_id,forum_id,read,write,post)
is there a way to deal with that kind of relation with rails such as by
using has_and_belongs_to_many kind of stuff?
thanx in advance
Pat
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
2015 Aug 01
2
OT - parted guidance
On Sat, Aug 1, 2015 at 3:34 PM, Robert Nichols
<rnicholsNOSPAM at comcast.net> wrote:
> On 08/01/2015 12:05 PM, Chris Murphy wrote:
>>
>> parted fs resize is deprecated.
>> http://savannah.gnu.org/forum/forum.php?forum_id=6837
>> parted fs move can only move a partition into free space
>> https://www.gnu.org/software/parted/manual/html_node/move.html
>>
2006 Jun 28
15
Its here! RubyGems Release 0.9.0
Read about it here:
http://rubyforge.org/forum/forum.php?forum_id=7575
--
Posted via http://www.ruby-forum.com/.
2007 Jul 18
5
Strange search result with conditions in find_by_contents
Hi, guys:
Strange search result with conditions in find_by_contents!
first of all, i''ve installed the acts_as_ferret to my project vender
folder by ''ruby script/plugin install
svn://projects.jkraemer.net/acts_as_ferret/tags/stable/acts_as_ferret''
in my SearchController
def searchforum
if !params[:doSearch].nil?
if params[:searchTerms].nil? || params[:searchTerms] ==
2007 May 03
1
Numeric Range or comparision doesn''t work
Hi,
it looks like Ferret still compares numeric fields by lexical ordering,
not numerical ordering. I am using Ferret 0.11.4(I tried in both linux
and windows, the results are the same).
index = Ferret::Index::Index.new()
docs = [
{:num => 1, :data => "yes"},
{:num => 1, :data => "no"},
{:num => 10, :data => "yes"},
{:num => 10, :data
2008 Aug 16
2
Partial site generation
Thank you for providing excellent tools.
I''d like to know about the partial site generation provided by webgen 0.5.2.
http://rubyforge.org/forum/forum.php?forum_id=26516
> When a file that was in the menu changed, all files which
> included a menu with a link to this file got regenerated,
> too. However, that was not always necessary since the content
> of the changed file
2008 Jun 18
3
Best Way of Extracting Key Value from File
What is the best way of extracting a key value pair from a file.
For example I have an email text file which goes like so :
--
Return-Path: <atharshiraz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Delivered-To: test-ovehrGOUempiNnqEydH9iw@public.gmane.org
Date: Sat, 3 May 2008 18:25:13 -0400
From: "Athar Shiraz Siddiqui" <atharshiraz-Re5JQEeQqe8AvxtiuMwx3w@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 Mar 04
0
ModelSecurity for Rails by Bruce Perens
Modelsecurity aims to provide access control within the data model so
that it becomes easy & efficient to specify read or write access to
individual fields.
It has one of those "why didn''t I think of that?" designs which make a
lot of sense.
Has anyone else tried using the latest release of ModelSecurity? What
has been your experience?
Home