On Fri, Jan 31, 2014 at 9:47 PM, Bizt <
marty...@gmail.com> wrote:
> def index
> @account = current_user.accounts.find_by_id(params[:account])
> @transactions = @account.transactions;
> end
>
> .. works fine
Consider, though, that if for whatever reason an invalid id is passed
in, @account will be nil and so @account.transactions will give you
a NoMethod error.
What do you want to happen at that point?
--
Hassan Schroeder ------------------------
hassan.s...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan