similar to: .rhtml in the model rather than the controller

Displaying 20 results from an estimated 1000 matches similar to: ".rhtml in the model rather than the controller"

2009 Jan 28
6
Creating an object from a pp string?
When I use pp on an object in rails, it prints out a nice string representation of the object. I am trying to pass objects from one server to another and I am wondering if I can just pass this string and create an object on the other server. Any libraries/functions out there that can do this? Or any other way to do this (not necessarily using pp). Thanks! -- Posted via
2010 Mar 18
3
Sending mail using action mailer
Hi everyone, I am new to ruby and i just wanna send an email using ruby action mailer. i have been trying it for about a day. Not achieved. so many replies came in from google but many were beating the bushes .. can any one send me a correct procedure.. regards ds -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups
2012 Oct 20
5
Is it possible to store the log file by day?
I hope to store the log file by day , because the log file will be so large with the time goes by.Is it possible to do this ? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to
2013 May 07
2
Net::HTTP
I''m looking at the documentation: http://ruby-doc.org/stdlib-2.0/libdoc/net/http/rdoc/Net/HTTP.html And I notice two uses of Net::HTTP. Both are using GET requests. But what''s the difference? When to use which? Net::HTTP.start(uri.host, uri.port) do |http| request = Net::HTTP::Get.new uri response = http.request request # Net::HTTPResponse object end uri =
2011 Jun 17
7
Encoding
What''s a good solution for fixing character encoding problems for compatibility between ascii and utf-8? The database is postgres and is encoded in utf-8. Once in awhile there will be a compatibility error from strings from a webform. Is there a command to fix this besides using a_string.force_encoding(''utf-8'')? Even this doesn''t seem to always work either.
2006 Jun 07
2
Making an HTTP request to an external machine
During one of my controller actions I want to call an external machine before I do anything. It''s not a real web service, more like a REST-style thing where I''ll just be tweaking a servlet running on another machine and sending it some data. Does Rails give me anything to work with for doing that? I read the web service stuff but it''s overkill for what I need. I
2006 May 18
2
Utility to translate HTML character entities into text?
Anyone know of a Ruby utility that will translate HTML character entities into text? Thanks, Wes -- Posted via http://www.ruby-forum.com/.
2006 Mar 05
2
Sending http post requests
I''m trying to send http post request in the controller to a web address. In my application I''m using ajax to communicate with the controller, and then use the controller to pass the message on to a remote server, something you can''t do using ajax because of browser security problems. Just wondering what the syntax for a http post is in rails. Thanks Alex -- Posted
2006 Mar 07
2
grep page source
hi all, any one know how to grep page source by rails? i.e. i wanna grep html source from http://www.ruby-forum.com/ by ruby code. regards -- Posted via http://www.ruby-forum.com/.
2005 Dec 29
3
What does ''h'' do?
I''m sure a real newbie question, but try searching for ''h'' in any search engine and you don''t get far. I am wondering what the h does in Ruby as in the code below: <%= h(truncate(product.description, 80)) %> -- Posted via http://www.ruby-forum.com/.
2008 May 05
2
Geocoding and XMLRPC
Hello people, I''m implementing a geocoding feature in my web app, a classic feature, for showing registered user by location. For this purpose, I''ve inspired myself from the following tutorial : http://earthcode.com/blog/2006/04/rails_geocoding_and_google_map.html However, I''m getting this error from Rails : uninitialized constant SandboxController::XMLRPC Being a
2006 Jul 06
3
URI.escape() broken or misdocumented in Ruby 1.8.4
URI.escape() is supposed to be able to take a second parameter listing unsafe characters in the URI. This may be a regexp or string. If a string, it''s supposed to represent a character set listing all unsafe characters. An example given in the core documentation at: http://www.ruby-doc.org/stdlib/libdoc/uri/rdoc/classes/URI/Escape.html#M008992 ...is: p URI.escape("@?@!",
2006 Jun 06
4
PHP FTP functions equivalents?
Two questions from a PHP guy thinking of moving to Rails: 1. Does Rails have equivalents for PHP''s FTP functions (www.php.net/ftp)? 2. What about image editing functions similar to PHP''s GD2 functions? (I would basically want to be able to crop, rotate, draw lines, add text...) I searched online for the above but I got somewhat conflicting info about image editing and
2006 Aug 08
3
How can i read a properties file in RoR
Hi, Iam a nubie, i wanna know how can i load/read a .properties file in to my rails application. For example i have a property file where i have defined the spanish equivalants of some english words as follows user Name:nombre del usuario user Code :c?digo del usuario likewise. now , where should i store this properties file in the directory structure and how can i read these in to my
2006 Sep 08
1
A quick guide to Mocha
Hello :) Having just gone through the (admittedly simple) API of Mocha to learn how it works, I wrote a quick guide (190 lines) to help others get up to speed. I''ve attached it as RDOC and as HTML. It is a first draft - please help me improve by giving feedback ! Contents : Overview - Quick overview of Mocha Unit testing, mock object and stubs - Very quick introduction to mock
2006 Mar 26
3
Charts and Java servers
Hi, As a long time Java/J2EE exponent I wanted to give Rails a fair crack of the whip and after we evaluated it for several weeks I have to say I like it. The installation process for the base system/framework is straightforward on the two platforms we''ve tried (Windows and Mac OS X). However, the charting components available, relying on ImageMagick or GraphicsMagick seem less clear
2006 Feb 08
10
Writing activex controls and dlls in ruby.
Is it possible to write activex controls and windows DLLs in ruby? I would like to have some of my logic be usable from VB (don''t ask why). Thanks.
2006 May 30
7
Stripping HTML tags from a string
Hello, Is there a common way of stripping html tags from a string? Right now I''m just calling gsub!(/<.*?>/, ''''), but with a background in PHP and always having used its strip_tags() method, I wonder if the Rails community has standardized this fairly common task with something a bit less simpleminded than my quick fix. Thanks! Zack -------------- next part
2006 Mar 25
6
Where''s the doc for get(), post(), put(), delete() & head()?
These HTTP Request methods are used for testing. They are discussed in the testing chapter of the Agile Web Development with Rails book, as well as in http://manuals.rubyonrails.com/read/chapter/28#page72 "A Guide to Testing the Rails". I want to set the encoding to multipart for a test I''m writing, but I can''t find any documentation to show me how. Pointing me
2006 Sep 13
1
Net::HTTPResponse
Hello :) I have a problem with the Net::HTTP library... The Net::HTTP library [1] uses a Net::HTTPResponse object for all it''s responses from web servers. This class has many subclasses, such as HTTPSuccess, HTTPRedirecttion, etc. When obtaining a response, the library suggests to check what it is by testing the class of the returned object - using case/when or kind_of? (which it does