Displaying 20 results from an estimated 100000 matches similar to: "include method in helper"
2006 Apr 08
4
rails won''t cache my action
I''ve decided to dive into page caching for my rails app. I''m doing my
testing with webbrick and it refuses to display the cached page for a
particular action. I''ve modified my paginator helper to put the page
parameter in the url so that the paginated page can be used with
caching. This works perfectly when the page parameter is in the url (ie
browse/2006/2 or
2006 Jan 20
4
[newbie]how to use link_to to link to another controller?
I am just diving into Rails and I am a bit puzzled by the link_to function.
am writing an app to display my photographs in categories. My application layout
has a sidebar to show a menu with categories from the categories table in the
database (like in taken from the tutorials), to be shown on every page.
I managed to get a global @menu_categories object that keeps track of all the
categories
2006 Mar 15
4
RJS template eating encoding
I was previously doing an update via .rhtml templates creating an AJAX
:evaluate_remote_response. I use UTF-8 in my pages, and my app
requires that I be able to, say, put Japanese characters in.
The problem is that when I switched this over to an RJS template it
started eating the encoding. I now get garbage characters where before
I got the correct ones.
The code for the RHTML:
<%=
2006 Mar 16
4
Handling/Catching Exceptions
Hello!
I was wondering, sometimes I raise an exception in my Rails apps, e.g.:
raise SecurityError unless @post.user == logged_in_user
Now: is there any way to catch that SecurityError exception somewhere
and render a custom template? E.g., I want to render
''app/views/content/security_error.rhtml''
Does anyone know how to do this?
Thanks a bunch,
Rob
2006 Apr 28
4
Conditional in Model
Hello ~
Is there a way to determine within a model which controller/action
instantiated the model?
Thx,
--
Ben Reubenstein
http://www.benr75.com
2006 Jan 23
4
an image that is a clickable link?
Hi,
How do I make an image that is a clickable link the rails way? Is
there a view helper for this?
Thanks,
Peter
2006 May 03
6
Scaffold Generation Problem
Greetings all,
I''m sure there is probably a very obvious reason for the following
problem. However, after much hair pulling, I am just not seeing it yet.
As you can see from the trace below, I am not able to complete scaffold
generation due to some problem between rails and mysql. I double
checked MySQL to make sure both my Ruby user and Root user have full
rights to the database.
2006 Apr 08
5
Strange error ...
I''m getting a very strange error in a very vanilla Rails app setup:
compile error
./script/../config/../app/views/home/index.rhtml:1: parse error,
unexpected $, expecting kEND
_erbout = ''''; _erbout.concat " <div id=\"index_main\">\n"
... ?
Anyone know what this might be? I installed the Login Engine and the
error started. I''m using
2006 May 05
6
RJS implementation question
Why is RJS so dependant on programatic creation of Javascript?
RHTML is a great implementation in that it puts HTML first, and Ruby
second. I would have thought RJS would be the same way: a .js with ERb
helpers for generating Javascript functions.
RJS putting Javascript second means:
- I have to learn a whole new set of commands to use Scriptaculous.
- Developers have to constantly chase the
2006 May 05
5
Attach a PDF File to an Email
Hello ~
I have an email that I need to attach a PDF to. The email is being
sent, and a file is attached but it is not the original file. I am
following the example:
attachment :content_type => "image/jpeg", :body => File.read("an-image.jpg")
changing it to:
attachment :content_type => "application/pdf", :body => File.read("pdf/my.pdf")
2006 May 08
8
RSS Feed / xml.link problem?
I''m having an odd problem. I''m trying to create an RSS feed (working off the
Recipe), but "xml.link" generates error about "Can''t convert Hash to
String". From the error trace, it *looks* like it''s calling the a fileutil
''link'' method (as in, filesystem symbolic link) - even xml.tag! generates
this error.
Er, how do I make
2006 Jan 23
3
[OT] Lighttpd + AWStats
Hello ~
I have posted a tutorial on my blog,
http://www.benr75.com/pages/lighttpd_awstats_tutorial, on how to get
AWStats and Lighttpd to work together. I thought it might be of interest to
Rails folk as I know many run Light.
Enjoy,
--
Ben Reubenstein
http://www.benr75.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2006 Mar 30
11
Illegal char \002? Need to restart Rails to see changes?
Hi all,
I''m developing an app on a home Windows computer and using
SVN/Capistrano to deploy to a Linux server. I''m encountering some
bizarre behavior that I think has something to do with Linux and Windows
text file types, but I''m not sure.
What''s happening is that, whenever I edit my view files and reload the
page in my local browser, I see errors saying
2006 Feb 07
11
Possible Rails Security Issue?
I have an e-commerce site and users check out with a form. The
results of that form are sent to a "confirm your order" page via
POST. I take great pains to NEVER store the full credit card number
on my server--just the last 4 digits. I was very surprised to find
that by default Rails will record POST requests with parameters in
the production.log. And those parameters
2006 May 09
6
To Do list project?
I''m looking for a good web-based to do list app. Essentially, I''d like
to use Basecamp''s todo management system, but that''s not an option
since I can''t install Basecamp on a server I own. The information
being tracked in the list cannot be sent out of my intranet.
I would imagine that there are a couple of open source rails apps that
would meet my
2007 Mar 12
7
Capistrano Hanging on Deployment
Hello ~
I am using the Capistrano recipe outlined in this post to restart my
backgroundrb server:
http://rubyforge.org/pipermail/backgroundrb-devel/2007-February/000718.html
My Version:
~~~~~~~~~~~~
task :before_restart, :roles => :app do
restart_backgroundrb
end
task :start_backgroundrb, :roles => :app do
sudo "nohup
2006 May 17
4
Unable to connect to mySql localhost
Unable to connect to mySql localhost
I installed MySQL 5.0 community version, without opening an account and
leaving the password empty with the Path included in the environment
variable.
In the post-installation testing, I typed C:\mysqlshow, the error
message is
Mysqlshow: Access denied for user ?ODBC?@?localhost? <using password:
NO>
Next, in RadRails 0.6.3, when I double-clicked
2006 May 23
2
TextMate and Tabs
Hello Everyone ~
Recently I have been moving Rails files between Mac, Linux, and Windows. As
many know the Windows Ruby version 1.8.4 doesn''t like tab characters. I
know in TextMate on the mac you can replace your tabs with spaces from the
Text > Convert menu, but is there a way to set it to do tabs with spaces
instead as you work? The preferences do not seem to have such a
2007 Aug 01
4
stability of using scheduled workers
Hi,
Going through the archive, and just keeping a general watch on this list seems to indicate that there are some issues using scheduling with backgroundrb. I need a worker that will perform some actions on an hourly interval. These actions will require access to several of the models in my application. I am currently using backgroundrb to handle processing of files, where I spawn a worker to
2006 Apr 27
4
Sessions Problems
Hi to group!
I am new to ROR!
I am facing problems on sessions.
First I created the one session variable.
after that I created the other one.
after moving to three pages the session was destroyed automatically.
What is the reason please help me!
Thnaks and Regards,
-Kumar Varma
--
Posted via http://www.ruby-forum.com/.