Displaying 20 results from an estimated 10000 matches similar to: "adding a method to an ActiveRecord Object"
2006 Aug 16
6
error with edge rails
I''ve started an app with rails 1.1.6 then ran freeze_edge. My app
will not run with rails in the vendor folder. Have I forgot to do
something? I"ve been without the internet for the last two months.
Has something changed?
2007 Jul 09
2
limiting processor usage
I have a very intensive background process that keeps taking up loads of the
cpu. If I have 2 of these going at once, I can''t even ssh to the box much
less get a page to load. Is there something I can do to limit this. I dont
mind if the process takes longer to run, I just dont want to freeze my box
every time it runs. Thanks for any advice!
Charlie
-------------- next part
2006 Jan 26
4
is Client.find(params[:id]) safe?
@client = Client.find(params[:id])
I use the above line in alot of scripts because it is shown this way in
the Rails book. Is this safe. Does it use placeholders? Will it leave
me open to an SQL injection attack?
--
Posted via http://www.ruby-forum.com/.
2006 Apr 11
11
I can''t get rails to see my plugin. How can I this?
I''m trying to produce a plugin to help me with my page caching woes. I
can''t seem to get rails to see my method within the plugin. This is my
first attempt at a plugin so I''m sure I''m missing something. I''ve
created a directory /vendor/lib/plugins/broom_stick/. I then created an
init.rb file with:
require ''broom_stick''
I then
2006 May 26
8
calling render_to_string outside of controller
How can I call render_to_string outside of a controller. I''m stuck on
this. I''ve nearly got my plugin finished but I can''t seem to get this
to work. The method is in ActionController::Base but it is protected.
--
Posted via http://www.ruby-forum.com/.
2006 Aug 07
8
Rails Recipes question - authenticating users
Didn''t think I''d be back so quick with another question but here goes:
In this recipe for the signin or login (as I call it) there are these
two lines if the user authenticates correctly:
session[:user] = user.id
redirect_to :action => session[:intended_action],
:controller => session[:intended_controller]
So I''m not seeing anything in the way of an explanation
2006 Jan 17
15
legacy database and finder_sql nightmare!
This is my first rails app with a legacy database and I''m having a
terrible time getting the models set up correctly. I have an order
table that has a primary field named order_number. I have a name table
with a primary of item_number. These two tables are liked by the
item_number and the order_number, but not as you might think. If the
order_number is 2500, then each entry in
2006 May 23
7
how to pull text from database and eval it?
I''m trying to add some executable code to my blog posts. How can I
include this inside of a blog post and eval it?
Charlie bowman
http://www.recentrambles.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060523/a3536408/attachment.html
2006 May 26
11
Weird Caching Issue
Hey all,
Here''s the issue... I''m not entirely sure it''s even a Cache-related issue,
but here it goes:
I''ve deployed a Rails app onto a subdomain of my clients site... The server
is running Apache2, and I''m proxying through to Lighttpd. The issue I''m
having is that I''m able to add content to the site (data exists in the db),
but
2006 Apr 18
11
how to release a plugin
I''ve developed a very useful (at least to me) plugin for rails. How do
I go about releasing it. I have an account with rubyforge but I don''t
know how to let rails know about it.
Charlie Bowman
www.recentrambles.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2006 Jan 17
6
database.yml and remote mysql database
I can''t seem to connect to a remote database. Here is what I''ve tried.
the database,username,password, and host have been changed to protect
the innocent.
development:
adapter: mysql
database: database
username: username
password: password
host: host
port: 3306
Here is the error
/usr/lib/ruby/1.8/yaml.rb:133:in `load'': syntax error on line 11, col 2:
`
2006 Feb 26
3
how to format and syntax highlight code in html
I''ve written my own blog (I know typo is better, but I wanted the
experience of writing my own) and I want to add syntax highlighting to
it. I''ve read about using the ruby gem syntax but I can''t figure out
how to implement it. I''ve also wondered if it could be used in my case.
How does it work when you have a long line of code but the <div> your
2006 Mar 29
2
vim syntax highlighting of rjs templates
Are there config files for vim that offer syntax highlighting of rjs
templates?
Charlie Bowman
http://www.recentrambles.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060329/486c9d84/attachment.html
2006 May 22
2
finding out the remote users username ENV[REMOTE_USER] ?
I''m trying to set the modified_by in my user table from the remote user
name. I have htaccess set up for the rails directory but I can''t seem
to get it to read the remote users name. is ENV[REMOTE_USER] the
correct syntax? I searched but I can''t seem to find a definitive
answer. Thank you for any help!
Charlie Bowman
http://www.recentrambles.com
-------------- next
2006 Feb 28
5
List and update installed gems?
Hi, could someone tell me how to list and update the currently
installed gems on my rails installation?
Thanks in advance,
-Conrad
2006 Mar 20
3
can''t get my rss to validate with feedtools
I know that I''m doing something wrong, but I can''t figure out what.
I''ve looked at every wiki and tutorial I can find on feedtools but I
still can''t get my rss feed working. Here''s my code.
feed = FeedTools::Feed.new
feed.entries << FeedTools::FeedItem.new
feed.entries[0].author.name = "Charlie Bowman"
feed.entries[0].title =
2006 Apr 28
35
what''s your rails wishlist?
I''ve been working with rails for a while now. Rails is the second web
framework I''ve tried. It blows the doors off catalyst (perl''s best
framework). I even just wrote my first plugin (broomstick). Ruby''s
ability to meta-program blew me away with it''s ease of use. I''ve been
so impressed with the helpers that rails uses to make a lot of
2006 Apr 10
3
can I expire a cached page using a regex?
I''m trying to expire all pages under my view action. These could
be /controller/view/1 or /controller/view/1/2
how can I expire all pages under /controller/view/? There must be a
way, but I''m stumped. Here''s my broken attempt. Thanks in advance for
any help,suggestions, or directions to a how to page.
expire_action(:controller =>
2006 Apr 28
3
Rails wizard page support
Hello,
does anyone know if there is a "best practice" how to implement wizard pages in
RoR? I want to have multiple pages for entity editing and creation. Is there
any rails plugin available? I think it would be nice to have a howto in the
rails wiki or to have built-in wizard support in RoR. What do you think? Any
suggestions how to implement this elegant?
--
Oliver Paulus
OpenPGP
2006 Apr 25
5
where does logic for the layout go?
on the main layout for my controller, i need a list of users - each with
their own link to a lists of tasks that they have been assigned.
i did have a line inside the .rhtml file that found all the users, but
i''m guessing this is probably the wrong place to put them. i''m new to
ruby and rails, so i still struggle a little with the MVC concept.
--
Posted via