Displaying 7 results from an estimated 7 matches for "polarisris".
2009 Apr 24
4
Undefined method "redirect_to" in before_filter
Code sample:
class SomeController < ApplicationController
before_filter do |c|
add_crumb "Blah", "/blah" #breadcrumbs plugin
redirect_to :controller => "foo", :action => "bar" unless c.send
(:has_package?)
end
# Rest of the controller...
private
def has_package?
# A bunch of logic work to check to make sure
# somebody''s session contains
2011 Aug 07
9
How can I disable Rails 3.1's ActiveRecord Query Caching?
Hey guys,
As most of you know, Rails 3.1 introduces query caching for
ActiveRecord. Great change all-in-all, but for those of us with IT
department mandates for using MySQL (yeah, yeah, I know...), it''s kind
of a mixed bag.
I need to disable query caching in a project I''m building based on
3.1. I''ve tried a couple different approaches, both without any
success. I
2011 Apr 07
3
[Rails 3] No route matches error using RSpec even though route DOES match
I''ve recently run into a really weird situation that I''m just not sure
what''s going on here. I''m trying to write a route that will allow
searches to be done via GET requests (generally a good idea since it''s
just retrieving information, helps for links and SEO, etc.), and I
have the route properly set up and can access it in development mode
just fine,
2010 Apr 29
1
Setting a message on a model -without- errors.add_to_base
I''m trying my best to follow the skinny controller/fat model concept,
and I''ve got a series of callbacks (that I''m about to move into
observers) running on a few models. Based on what these callbacks do
to the data (it''s implementing business rules), I''d like to add some
type of message on the state of the model *without* invalidating it.
For example:
2011 Mar 06
2
Can JRuby be used to "compile" or "encrypt" code?
Coming from PHP, I''m used to seeing things like Zend Encoder that can
take PHP and pseudo-compile it, obscuring the source (useful in the
event you want to sell a product written in said language). I haven''t
found a direct equivalent with Ruby (though if you know of one I''d
like to hear about it), but it occurs to me that JRuby might be used
to do something similar.
2009 Feb 26
1
Line breaks removed from ActionMailer template
I''ve been googling and searching this list for about an hour now, and
maybe I''m just not thinking of the common nomenclature for what to be
looking for, but I can''t find jack.
Here''s the deal: I''ve got an application coded correctly, sending the
mail out, and the template is structured correctly (method_name.erb is
the filename) with LF line breaks
2010 Jul 12
2
[R3B4] errors[:base] = appends, doesn't "set" - bug, feature, or "error 18"?
If you haven''t heard, an "error 18" means "the error is 18 inches from
the screen." Which would mean that I totally get that this could just
be me being stupid.
However, for some reason I''m thinking this violates the normal
behavior of an Array object, so I''m curious as to if I''m doing
something wrong here, or if something really is buggy