On Mon, Sep 17, 2012 at 9:31 AM, Bogdan M. <[email protected]> wrote:
> controller: > > def random > @task = Task.find(rand(Task.first.id..Task.last.id)) > # REMOVE - UNNECESSARY render "random" > end > > random.html.erb > <%= @task %> # i want it to make it work, if i pass manually > lets #say `../random/1` lets say as an example it works it shows me the > memory #location of the object. @task.inspect would be more useful, or actually displaying some specific attributes of the object :-) > error log: > > ActionController::ActionControllerError in TasksController#show > Cannot redirect to nil! But here, you're not even using your "random" method, you're calling "show" -- check your routes. -- Hassan Schroeder ------------------------ [email protected] http://about.me/hassanschroeder twitter: @hassan -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

