Thanks for the reminder. This stuff is in a protected admin area so I
don't really care, but I should play on the safe side anyhow.
cheers,
Matt
http://blog.mattwynne.net
http://songkick.com
In case you wondered: The opinions expressed in this email are my own
and do not necessarily ref
On Mon, Aug 18, 2008 at 1:26 PM, Matt Wynne <[EMAIL PROTECTED]> wrote:
> def get_where_clause
>
>clause = []
>
>clause << "city_id = [EMAIL PROTECTED]" if @city_id
>clause << "name like '[EMAIL PROTECTED]'" if @name
>
I think you've still got SQL injection problems he
Thanks Scott. I refactored it today to use what I called a
QueryAdapter, namespaced inside the model. It basically subclasses
Hash, takes the params from the controller into the constructor, and
becomes the hash to be sent to find_all.
I feels much better, as I now have the code that's coup
On Aug 15, 2008, at 9:29 AM, David Chelimsky wrote:
On Aug 15, 2008, at 6:46 AM, Matt Wynne <[EMAIL PROTECTED]> wrote:
On 15 Aug 2008, at 12:25, David Chelimsky wrote:
Hey Matt - welcome!
The paginate() method lives on the model class, so there's nothing
stopping you from wrapping those ca
On Aug 15, 2008, at 6:46 AM, Matt Wynne <[EMAIL PROTECTED]> wrote:
On 15 Aug 2008, at 12:25, David Chelimsky wrote:
Hey Matt - welcome!
The paginate() method lives on the model class, so there's nothing
stopping you from wrapping those calls in methods on the model,
slinging around the params
On 15 Aug 2008, at 12:25, David Chelimsky wrote:
Hey Matt - welcome!
The paginate() method lives on the model class, so there's nothing
stopping you from wrapping those calls in methods on the model,
slinging around the params object.
# CityController
def get_cities
City.paginate_all(params
On Fri, Aug 15, 2008 at 5:28 AM, Matt Wynne <[EMAIL PROTECTED]> wrote:
> Hi TDD Fans,
> I'm pretty new to Ruby / RSpec / Rails but not to TDD.
> This is more of a general 'how do you do good design in a rails app'
> question than an rspec-specific question. I'm asking it here because I know
> this
Hi TDD Fans,
I'm pretty new to Ruby / RSpec / Rails but not to TDD.
This is more of a general 'how do you do good design in a rails app'
question than an rspec-specific question. I'm asking it here because
I know this list is read by lots of people who care about good
design, but please fe