Displaying 20 results from an estimated 100000 matches similar to: "respond_to_parent and Rails 3"
2010 Dec 11
1
ajax :update option with Rails 3
With Rails 2.3.9, I could use the :update option with an ajax helper
if I just wanted to update the contents of an element. The controller
action looked liked this:
format.js { render :parital => ''_updated_object'', :layout => false }
I''m trying to figure out how to accomplish the same thing with Rails 3
ujs? I know I can accomplish this by having the controller
2011 May 17
8
Changing Rails Default Date Parse Option
Does anyone know how to change the default option for the Date.parse
(which ActiveRecord is using on all date fields). I would like the
"comp" option to default to true so I don''t have to account for 2-
digit dates throughout my application.
http://corelib.rubyonrails.org/classes/Date.html#M001228
Thanks!
Tom
--
You received this message because you are subscribed to the
2010 Oct 07
0
responds_to_parent in rails 3
Hi,
In rails 3 respond_to_parent is not working. I am getting some
undefined method errors. Is there is any way to solve the issue in
rails 3.
--
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,
2010 May 15
3
ActiveResource Mock Objects
Some of my tests use ActiveResource HttpMock requests and some of them
do not. Does anyone know if there is a way to disable the HttpMocks
after they have already been loaded? The method
ActiveResource::HttpMock.reset! only removes all the objects, but
ActiveResource still thinks it should look for mock requests rather
than actually making requests. I hope this makes sense!
Thanks,
Tom
--
2010 Feb 23
2
Logging and Exceptions with Script Runner
I have cron jobs that run script/runner commands and I have two
questions:
1. Should logging be working when calling the logger methods from an
object within the script?
2. Should Exception Notification work when an exception occurs in the
script/runner?
Thanks!
Tom
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to
2010 Feb 11
2
Inconsistent Hash#to_xml Method
I have a unit test that demonstrates some inconsistent behavior with a
Hash being converted to XML with the :root option. Sometimes it works
fine:
Hash.new.to_xml(:root => ''test'')
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<test>\n</test>\n"
But sometimes I get an argument error:
Hash.new.to_xml(:root =>
2010 Feb 09
1
Eager Loading
Is there a way to specify within a model that an association should
always be loaded. For example, the classic example from the API docs:
Post.find(:all, :include => :author)
What if I ALWAYS wanted the author to be loaded whenever a Post object
was created? So, in essence, Post.find(:all) would bring back each
post with the associated author object already loaded.
Thanks!
--
You
2010 Sep 01
4
deprecation warning in Rails 3 about Base.named_scope
I recently upgraded to Rails 3, and this error has come up
ubiquitously:
DEPRECATION WARNING: Base.named_scope has been deprecated, please use
Base.scope instead.
Any ideas on how to get rid of it? Or should I just wait for
something?
There''s actually no place in my application where the code
"Base.named_scope" exists, so I assume the problem is inherent in gems
that
2011 Jul 14
1
Rails with BitKeeper
Hi,
I''m currently writing a Rails app, in a repository controlled by
BitKeeper.
BitKeeper creates files, in the sub-directories it controls, so for
source file yyy.zzz in Directory XXX it saves a file called
s.yyy.zzz in subdirectory XXX/SCCS.
When these files are created in config/initializers, rails tries to
load them when it is run (as they retain the .rb extension).
So my question
2011 Nov 12
2
Can I drop-in a Ruby script and execute it within one of my Rails pages?
Is it possible to drop a Ruby script (around 50 lines) into one of your
Rails pages? I am experimenting with doing this but I haven''t had any luck
in finding out how.
An example of what I am trying to do is to place a script like this
https://github.com/johnyerhot/rquote/blob/master/lib/rquote.rb and see if I
can''t drop it into a page like this simple view I made in Rails
2010 Feb 22
1
Rails environments
Hi
I have a very basic question to ask. ut I dont know how to handle it
properly.Please help. I am working in a team. So I am strting the
application in my machine in development mode. Now my manager asked me
to give it for testing. So should I start the application in my machine
in test environment in another port say localhost:3001 and asks the
testers to access my machine? Is the
2013 Sep 26
0
Production quality Rails 4 chat demo?
Hi Everyone,
I''m trying to use Rails 4''s ActionController::Live functionality to do a
chat-like interface in my app. I''ve found a number of blog posts, all of
which seem to be based on Aaron Patterson''s original one here:
http://tenderlovemaking.com/2012/07/30/is-it-live.html
Has anyone here successfully gotten this to work well enough for
production? I assume
2010 Oct 27
4
Anything special needed to migrate test::unit tests from Rails 2x to Rails3?
Looks like I''ve gotten my app upgraded successfully, at least in the
browser. When I ''rake test'' I get no love. I know I can start digging
through the Rails rake tasks, first want to see if anyone has an idea what
is going on:
DKMac:creditcompare3 DK$ rake test
(in /Users/DK/Documents/ror/projects/creditcompare3)
DKMac:creditcompare3 DK$
(requesting verbose fares just
2010 Jun 03
7
Scheduled tasks in Rails: Cron + wget = Best solution?
Hi there,
do you agree that for having scheduled tasks in Rails, the leanest
solution is the following?
- Create a controller with an action for each task
- Implement the logic of the task as controller code
- Set up a cron job at the OS level that uses wget to invoke the URL of
this controller/action at the appropriate time intervals
Advantages:
1) full access to all your Rails objects just as
2014 May 29
0
How to make the tests pass in an elegant way? Ruby on Rails
I am writing a rails app with my colleague who wrote a lot of the tests.
He had to take a leave of absence due to a death in his family, and I am
needing helps with changing the model so that the tests will pass in our
spec file.
Here is the model:
class Worker < ActiveRecord::Base
attr_accessible :first_name, :last_name
has_many :writings
end
Here is the spec:
2011 Feb 02
1
newbie: paypal + line items
hi,
using activemerchant + rails the first time. how can i send my line
items + descriptions etc over to paypal so that the user can review
the items?
purchase_options{
:items => [
{
:name => "Tickets",
:quantity => 22,
:description => "Tickets for 232323",
:amount => 1211221
},
2011 May 16
1
You cannot have more than one Rails::Application (RuntimeError)
I installed RVM and am getting a kinds of errors. I have managed to get
most things back to normal but I get this error now in one of my apps.
/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.7/lib/rails/application.rb:63:in
`inherited'': You cannot have more than one Rails::Application
(RuntimeError)
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are
2010 Apr 06
1
captcha in a belongs_to
Hi
I am using simple_captcha. I have two models User and Staff.
Relation ship are
User has_one staff
staff belongs_to user
Now in the staff edit I have to include a captcha. I did like
<% form_for @user, :url => staff_url(@staff), :html => {:method => :put
} do |f|%>
<p>
<%= f.text_field :first_name,:maxlength => 50 %>
</p>
2011 Feb 25
2
Rails 3 and Sproutcore
Hi people,
Anyone is using Rails 3 (backend) with Sproucore (front-end) ?
--
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
2012 Feb 03
1
Forum in rails 3
Hi All
i want to integrate forum in my web application.
so does have any gem that good for me ?
thank
sreng
--
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, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this