Hi Martin,
That's a pretty common situation that you describe. One way, which is
adopted by Rails team is to factor your related methods in modules and
include them in your controllers. You can put those modules near your
controllers or under /lib (which is loaded automatically).
But before
Saurabh,
That doesn't seem to have anything at all to do with Ruby or Rails.
Why don't you direct your query to the PayPal forums at http://x.com?
/Ritchie
On Feb 8, 3:15 pm, Saurabh Peshkar li...@ruby-forum.com wrote:
I want to use the paypal adaptive parallel payment API with ROR, please
I'm sorry, looked at the wrong page and didn't notice the ongoing
discussion.
As you could see, I second that you don't need fat controllers and
that CSV processing logic belongs to a CSVProcessor model (not
module). It doesn't have a table, but it is a standalone entity that
knows how to work
Aleksey Gureiev wrote:
I'm sorry, looked at the wrong page and didn't notice the ongoing
discussion.
As you could see, I second that you don't need fat controllers and
that CSV processing logic belongs to a CSVProcessor model (not
module). It doesn't have a table, but it is a standalone
Hi,
I was thinking whether it would be more elegant for a view to call
methods on the controller rather than rely on instance variables. I'm
not really sure what the answer is so thought I would throw it out
here.
Perhaps with a basic DSL that makes it explicit what the controller is
setting,
Female Condom Model - Anatomical Model
\Manforce Condom hot sexy model photo
Correct Condom Usage
http://sites.google.com/site/quicksinfos
warning adults!(+18)
condom using photoes and videos
http://sites.google.com/site/lovlybeautyz/
for more detail use this sites
What I want is a document uploader on the front end so my visitors can
upload their CV or a completed application form and then submit this
document. On submission, an email will be sent with the document
attached to a specified email address.
If any code is required, then don't hesitate to ask.
I just installed Centos 5.4 64 bit. Nothing out of the ordinary, but
this is a plain vanilla installation with ruby enterprise and
passenger.
My app works as it should, but when I try to run 'script/console' it
does not load my models. I have to manually load them. Does anyone
know why this
On 7 February 2010 23:19, brianp brian.o.pea...@gmail.com wrote:
So it turns out it's not just the partial. Any dropdown select i ad to
that page will not properly display :prompt. Now I have an ajax update
method so If i change the select all selects are reloaded. And as soon
as I change one
the deletion doesn't cascade to the master record
That makes sense, because it would mean that if one truck record is
deleted, then the rest of that masters truck records would also be
deleted as well.
Are you trying do delete the master record if it only has one truck
record?
If that's the
Rails comes with ActionMailer, which supports emailing attachments.
http://guides.rubyonrails.org/action_mailer_basics.html
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post to this group,
Sharagoz -- wrote:
Rails comes with ActionMailer, which supports emailing attachments.
http://guides.rubyonrails.org/action_mailer_basics.html
Thank you, but first, I need my application to actually have the ability
to upload the document I want to attach and mail.
--
Posted via
Hi All,
Does anyone know if there are any good examples of how to use the
unobtrusive javascript functionality in Rails 3. I've read the
release notes but I can't seem to get things working.
I've just set up a simple Rails app with a Post model. In the _form
partial I have add the :remote =
There are plenty of tutorials out there on how to do this, if you just
google for it. For instance:
http://www.tutorialspoint.com/ruby-on-rails/rails-file-uploading.htm
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups Ruby
@coll= [{:period={:people=[#], :date=Sun, 08 Feb 2009}},
{:period={:people=[#, #, #, #, #, #, #, #, #, #, #, #, #, #, #, #,
#, #], :date=Sun, 15 Feb 2009}}, {:period={:people=[#, #, #, #, #,
#, #, #, #, #, #, #, #, #], :date=Sun, 22 Feb 2009}},
{:period={:people=[#, #], :date=Sat, 28 Feb 2009}},
Another question related to this... I have everything grouped by
common date, but now I want to do it my month. Any ideas?
On Feb 4, 4:08 am, Rick DeNatale rick.denat...@gmail.com wrote:
On Wed, Feb 3, 2010 at 3:58 AM, eggie5 egg...@gmail.com wrote:
Hi,
I have a collection of arbitrary
---
Akshay Nawale wants to stay in better touch using some of Google's coolest new
products.
If you already have Gmail or Google Talk, visit:
http://mail.google.com/mail/b-63ba558873-726d82338f-2bba3f259d787d35
You'll need to
I am not exactly sure what is meant by CoC, Continuity of Code?
CoC means convention over configuration, which is supposed to be one
of Rails' founding philosophies.
if you are determined to play along with an outdated book that uses an
outdated version of Rails, you might consider
On Feb 7, 7:00 pm, Solly directxma...@gmail.com wrote:
Hi,
I have an application using STI on a model named Publisher. Publisher
uses STI via a column named service. When I call
--
p = Publisher.new(..., :service = TwitterPublisher)
--
the service does not get assigned, yet all other
On Feb 8, 12:46 am, Mat Brown m...@patch.com wrote:
You're a software engineer using OS X?
Odd.
Are you *trying* to start a flamewar?
--Matt Jones
--
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
Diogo Delgado wrote:
The fork code is available at: http://github.com/DBA/authlogic_openid
I'm taking a look at the automatically generated content:
def create
@report = Report.new(params[:report])
respond_to do |format|
if @report.save
flash[:notice] = 'Report was
I just try and all are working good under Ruby 1.8.7 MRI... (I did'nt
try RVM...)
I did'nt any special thing, I just install pg gem and run:
rails xxx -d postgresql
cd xxx
I have modify config/database.yml adding = host: localhost and setting
user / password
rails generate scaffold user
is there is new.rhtml or new.html.erb in yours app.
On Mon, Feb 8, 2010 at 7:50 PM, Aldric Giacomoni li...@ruby-forum.com wrote:
Diogo Delgado wrote:
The fork code is available at: http://github.com/DBA/authlogic_openid
I'm taking a look at the automatically generated content:
def create
The Rails Way certainly is the de facto Rails book... but for Rails 1.2. I'm
pretty sure it was never updated for 2.x, but I could be wrong. My copy is
for 1.2.
In any case, yeah, as everyone else said, it should work. The rake routes
suggestion is a good one, since you're seeing a routing error.
Jun Young wrote:
head
hello, this is template!!
/head
body
a href='javascript:func_a(arg1, arg2, arg3)'click/a
This is a very old technique and I would not recommend using this style
to call JavaScript functions.
Here is a more modern syntax:
a href=# onclick=func_a(arg1, arg2, arg3);
Wait a moment...
Do you have removed the old versions of bundler gem ? (I think that is
very important to have only the last version installed !!!)
Hi there,
I'm trying to get up and running with PostgreSQL 8.4 and the Rails 3
beta. I'm running on Ruby 1.8.7 via RVM and have installed the
Andrew France wrote:
Hi,
I was thinking whether it would be more elegant for a view to call
methods on the controller rather than rely on instance variables.
The trouble with this is that controller methods are actions, not
getters.
I'm
not really sure what the answer is so thought I
Pale Horse wrote:
Sharagoz -- wrote:
Rails comes with ActionMailer, which supports emailing attachments.
http://guides.rubyonrails.org/action_mailer_basics.html
Thank you, but first, I need my application to actually have the ability
to upload the document I want to attach and mail.
Kirk Howard wrote:
Whenever you can't build native extensions, it means there is some lib
or lib-dev missing. Generally you'll need to do a sudo apt-get install
lib-???-dev, or sudo apt-get install build_essential.
This time, I had to install the following:
'sudo apt-get install
On 09/02/10 01:32, Marnen Laibow-Koser wrote:
Andrew France wrote:
Hi,
I was thinking whether it would be more elegant for a view to call
methods on the controller rather than rely on instance variables.
The trouble with this is that controller methods are actions, not
getters.
Hey guys,
How can we give two form_for based on conditions? I mean like this:-
unless condition1.nil?
form_for :abc, :url = { :action = 123 } do |f|
else
form_for :abc, :url = { :action = 234 } do |f|
end
This is not working. Can you guyz tell me where is the problem ? How can
i write this
The polymorphic :locatable association implies a :locatable_type and
:locatable_id column. These columns reference a row in an arbitrary table
identified by :locatable_type so no join table is needed.
On Feb 7, 2010 11:02 PM, Sean Six li...@ruby-forum.com wrote:
This is an example from the
On Feb 8, 4:44 am, Andrew France andrew+li...@avito.co.uk wrote:
Hi,
I was thinking whether it would be more elegant for a view to call
methods on the controller rather than rely on instance variables. I'm
not really sure what the answer is so thought I would throw it out
here.
Perhaps
Andrew France wrote:
On 09/02/10 01:32, Marnen Laibow-Koser wrote:
Andrew France wrote:
Hi,
I was thinking whether it would be more elegant for a view to call
methods on the controller rather than rely on instance variables.
The trouble with this is that controller methods are
Hi,
On Sat, 2010-02-06 at 09:40 -0800, señor tower wrote:
Thanks for our unfounded point of view Marnen.
I still would like to know if anyone else has come across anything
similar.
a simple hit counter... to display some basic metrics.
thanks so much.
We did something on a project I
@action = condition1.nil? ? '234' : '123'
Thanks for a quickie dude.. Resolved .. :)
And in the view:
form_for :abc, :url = {:action = @action} do |f|
Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org
--
Posted via http://www.ruby-forum.com/.
--
You
I have to write a call from my rails app to an external URL :
http://999:mad...@api.bingostore.com/apis/media.php?action=createCollectioncollection_id=123
then I should get back an XML answer , to be parsed (I need to reuse
these info into my web app)
collection
id180/id
thanks a lot, I am going to have a look at Nokogiri
yves
On 8 fév, 17:46, Mat Brown m...@patch.com wrote:
You can use Net::HTTP, which is part of the standard Ruby library, to make
the external request. REXML, also part of the standard library, can parse
it, though I'd suggest using Nokogiri
Hi-
I'm trying to implement an auto-complete using Yahoo's autocomplete
server, which basically suggests search completions:
http://ff.search.yahoo.com/gossip?output=fxjsoncommand={your
searchterms}'
if you want to see the results in your browser, use xml instead:
On Sat, Feb 6, 2010 at 6:38 PM, MichaelF mich...@fromin.org wrote:
I am using Rail 2.2.2 with JRuby 1.4 to deploy to a Tomcat 6 server.
In looking through the Warbler documentation I am stumped on the
proper settings for a couple of parameters.
In my warble.rb file I see lines for:
#
HI, I have inherited support on a rails website and I am encountering
the following problem:
% if @request.env['HTTP_USER_AGENT'].downcase.index('msie 6.0')!=nil %
%= stylesheet_link_tag 'ie6' %
% elsif
@request.env['HTTP_USER_AGENT'].downcase.index('msie
Ok, I think I understand why RoR will flag an attempt double render in
an action.
What I don't understand is the philosophy of render and redirect_to.
Specifically, why isn't a return implicit in both those methods?
Or, I guess, more to the point ... what are the advantages of writing
code in
There isn't much point in writing code after a render/redirect in a
controller method, and it's safe to say it's a best practice not to. I
think the main reason render/redirect work the way they do is to make
it easier to use those methods in before/after_filters.
For what it's worth, Merb's
Ketema Harris wrote:
HI, I have inherited support on a rails website and I am encountering
the following problem:
% if @request.env['HTTP_USER_AGENT'].downcase.index('msie 6.0')!=nil %
%= stylesheet_link_tag 'ie6' %
% elsif
Hi Katerna,
Rails has a handy helper for this. blank? returns true for false, empty
or whitespace strings. nil is false. You'll need to move the negation
to the beginning.
On Mon, 2010-02-08 at 19:53 +0100, Ketema Harris wrote:
% if @request.env['HTTP_USER_AGENT'].downcase.index('msie
What, exactly, does
ECONNABORTED: An established connection was aborted by the software in
your
host machine.
mean?
So ... let's start with the most basic of questions: What's a
connection?
When one has a connection, does there have to be communication
back-and-forth periodically before the
Ketema Harris wrote:
HI, I have inherited support on a rails website and I am encountering
the following problem:
% if @request.env['HTTP_USER_AGENT'].downcase.index('msie 6.0')!=nil %
%= stylesheet_link_tag 'ie6' %
If the user agent is for IE6...
%
On 9/2/2010 3:04 AM, Ralph Shnelvar wrote:
Ok, I think I understand why RoR will flag an attempt double render in
an action.
What I don't understand is the philosophy of render and redirect_to.
Specifically, why isn't a return implicit in both those methods?
Or, I guess, more to the point ...
On Feb 8, 2010, at 2:13 PM, Aldric Giacomoni wrote:
Ketema Harris wrote:
HI, I have inherited support on a rails website and I am encountering
the following problem:
% if @request.env['HTTP_USER_AGENT'].downcase.index('msie 6.0')!
=nil %
%= stylesheet_link_tag 'ie6' %
Rob Biedenharn wrote:
On Feb 8, 2010, at 2:13 PM, Aldric Giacomoni wrote:
@request.env['HTTP_USER_AGENT'].downcase.index('msie 7.0')!=nil %
nil:NilClass)
how can i edit this code so that it can handle an empty user agent
string?
Ah, I see. You want 'nil' .. So you should first say that :
On Feb 8, 5:19 pm, dino d. dinodorr...@yahoo.com wrote:
Am I violating some rule about cross-site ajax calls? Can I have my
server generate the observe_field code which calls a 3rd party server
for ajax updates, like observe_field?
The javascript that observe_field generates will mean that
Hello Everybody,
I am a newbie with rails, so please forgive me if I made a mistake.
I have a link in a view that uses java script to toggle a div.
Now, I need to test this. But I simply don't know how to trigger
the action of clicking on a link (to toggle the page element) in a test.
I have
Hi,
I've set up several ActiveModel callbacks an run them via
_run_whatever_callbacks do
.. some code
end
Now i would like to run the before_whatever and after_whatever
independently, aka
_run_before_whatever_callbacks. Is that somehow possible?
I need that for running the callbacks on a set
Hey,
checkout Selenium (http://seleniumhq.org/). You can use that with webrat
and/or cucumber to test javascript within your browser.
Robert
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To
On Mon, Feb 8, 2010 at 12:53 PM, Ketema Harris li...@ruby-forum.com wrote:
HI, I have inherited support on a rails website and I am encountering
the following problem:
% if @request.env['HTTP_USER_AGENT'].downcase.index('msie 6.0')!=nil %
%= stylesheet_link_tag 'ie6' %
http://stackoverflow.com/questions/2224994/why-are-double-sided-polymorphic-relationships-lacking-in-rails
--
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-t...@googlegroups.com.
To
Hello everyone,
newbie question:
I have a couple of methods that interact with a remote python server
in application.rb.
Is there a convenient way to debug them? e.g. run them from ruby
script/console - debug-console and see the return values?
Example-method:
def
Inverse associations will be standard in Rails 2.3.6. For the
impatient, here's a backport:
http://github.com/oggy/inverse_of
Mat
On Mon, Feb 8, 2010 at 16:43, tsenart tsen...@gmail.com wrote:
I want this too, thanks very much.
David B. wrote:
Hi everybody,
Is there a simple way to get the page generation time and display it in
a view? I believe so because this information is published in the
terminal (in development mode).
Thanks,
Dendicus
--
Posted via
David B. wrote:
Hi everybody,
Is there a simple way to get the page generation time and display it in
a view? I believe so because this information is published in the
terminal (in development mode).
The rails_footnotes plugin, perhaps?
Thanks,
Dendicus
Best,
--
Marnen Laibow-Koser
Check out Rack::Bug
On Feb 8, 2010 5:19 PM, Idler Xian li...@ruby-forum.com wrote:
I want this too, thanks very much.
David B. wrote:
Hi everybody,
Is there a simple way to get the page generation time and display it in
a view? I believe so because this information is published in the
lukas wrote:
Hello everyone,
newbie question:
I have a couple of methods that interact with a remote python server
in application.rb.
Is there a convenient way to debug them? e.g. run them from ruby
script/console - debug-console and see the return values?
Just set a breakpoint, run
Hi there, I wan tto be able to allow users to invite friends...
The action below is exactly the same as the code used to send a user
their username. Only difference is, I need to change the ''user =
User.find_by_email(email)'' part as obviously, I dont want to only
email people who are already on
Eric,
I have it going using the validation syntax recommended in the RDoc:
if verify_recaptcha(:model = @job) @job.save
...
When I tried using an if/else for the validation, a mismatch threw an
error.
-Kyle
--
You received this message because you are subscribed to the Google Groups Ruby
So looks like this is an issue with the PostgreSQL install that I
happened to snag. I just finished blowing everything away and
reinstalling it all from MacPorts and it's working like a charm.
Huge thanks for your hep, Gianluca!
-J
Gianluca Tessarolo wrote:
I just try and all are working
I have a version of the book with something that looks like a circular
stamp on the cover that says Covers Rails 2.0, so I guess it has
been updated. ;)
And I would have to agree with Marnen. It looks like you have a
routing issue.
Cheers.
On Feb 8, 8:16 am, tuti plain li...@ruby-forum.com
Hello all,
I need to create a object history, as I'll have multiple editors for a
site i am working on. Of course it would be great to have the ability
to restore an object to its state and undo the damage due to a bad
editor, but I'll settle for a system that will tell me who to blame.
On Feb 9, 11:48 am, PsiPro arjes...@gmail.com wrote:
Hello all,
I need to create a object history, as I'll have multiple editors for a
site i am working on. Of course it would be great to have the ability
to restore an object to its state and undo the damage due to a bad
editor, but I'll
Hi all,
I want to display the list of all twitter user names.'
Please suggest me something on that
Getlists is a method which i have seen it in the API
looking forward for a response
Thankyou
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk
Hi,
I'm trying to implement a very simple acts_as_tree search in my index
html.
I am able to show the parents, with no issue, but the children will
not show.
I have something like this for the parent, which displays fine:
% for group in Group.roots %
td
tr
a href=#
Hi,
I think you've made a little mistake...
The correct form is this:
% for group in Group.roots %
...
%= link_to (group.name), group %
...
% for child in group.children %
...
%= link_to (child.name), child %
...
Notice the use of group.children instead Group.children
Hope
Yes, this was helpful, and I appreciate it. Thanks for your reply.
On Feb 8, 11:29 pm, Gianluca Tessarolo
tessarolo.gianl...@mediamaster.it wrote:
Hi,
I think you've made a little mistake...
The correct form is this:
% for group in Group.roots %
...
%= link_to (group.name), group
72 matches
Mail list logo