Displaying 20 results from an estimated 8000 matches similar to: "render collection undefined local variable"
2006 Feb 07
4
Ferret on Rails -- Webrick won''t start?
Hello,
I tried using
http://ferret.davebalmain.com/trac/wiki/FerretOnRails
but Webrick won''t start after implementing the plugin?
I tried both versions but to no avail?
All I get is Booting up ... and then it dies?
No info in log/development.log?
Does anyone has a working copy of acts_as_ferret or has any ideas on what''s wrong? I am placing the plugins
2012 May 22
4
undefined method `paginate'
I am working with Railsspace social networking book. I stuck in the
problem when i am doing paginate for the search result. It gives the
following error.
NoMethodError in CommunityController#index
undefined method `paginate'' for #<CommunityController:0x57436f0>
My Controller Index page coding is below
def index
@title = "Community"
@letters =
2006 Feb 15
10
STI Question
Hi everyone,
I have 3 types of people (for now):
Staff
Faculty
Students
To break them up into classes, but keep them in the same People table,
I''ve broken them up like so (code and ''ends'' snipped):
class Person < ActiveRecord::Base
class Employee < Person
class Staff < Employee
class Faculty < Employee
class Student < Employee
So, when I insert
2006 Jan 31
6
Pagination - why is it this hard?
Hi everyone,
I''m at the end of my rope on this. I can''t get pagination to work
with anything but a standard find on a model. If I try to do a search
and customize the pagination, I get lots of different variations.
My thought was to have the list action do what it does, but to pass it
a list of search conditions from the search action. So, if search
determines that we need
2007 Aug 26
2
Multi-word query searching across columns
I''m trying to implement a basic name search on a People table with
separate first_name and last_name columns. I am using the
will_paginate plugin and have the following search method in the
model:
def self.search(search, page)
paginate :page => page,
:conditions => ["lower(last_name) like ? or
lower(first_name) like ?",
2006 Mar 15
4
[NQ] How to set an initial FK for a new item of something?
Hi all,
running into a little problem here. I''ve a list of things
with a "New thing" link beneath it. When you click that link,
obviously, a new thing shall be created. Now, that works pretty
fine for things that don''t have foreign keys, but for things that
do it crashes, since there is not yet a thing.other_thing.name
available.
I suspect you can somewhere in
2006 Feb 02
12
basic ''find'' question
I am struggling to understand the methodology here...
I have a find.rhtml
<%= start_form_tag :action => ''list2'', :first_name = client %>
<%# render :partial => ''form'' %>
<p><label for="client_first_name">First name</label><br/>
<%= text_field ''client'', ''first_name''
2006 Jan 09
3
Pagination :conditions not working - MySQL v. PostgreSQL, Rails abstraction v. embedded SQL
Hi everyone,
I have this code:
@person_pages, @people = paginate :person, :per_page => 20,
:conditions => [ "username LIKE ? OR first_name LIKE ? OR
last_name LIKE ? OR preferred_name LIKE ?",
"%" + params[:q].downcase + "%",
"%" + params[:q].downcase + "%",
2007 May 30
4
aaf and dynamic attrs: a bug?
Hi!
I faced some issue while using it for dynamic attrs indexing/search.
Maybe I made something wrong. Here is test method. Everything works just
fine until last line http://pastie.caboo.se/66274 . Tested on both
stable and trunk of aaf and ferret 0.11.4.
the short version of code below:
Contact.acts_as_ferret :fields => [ :first_name ]
assert
2006 Jan 10
15
KISS and DRY? Not even close!
Hi all,
After working on my first rails app and having handed over some very
sophisticated coding from a lot of you guys. My app does what I want it to
do, but I''m no where near the end yet, and it seems that the KISS and DRY
objectives already went down the drain.
It could be lack of knowledge, only doing Ruby on (and) Rails for a month, but
I''m stuck on the following:
2006 Jun 23
3
form_remote_tag is not passing form params
I''ve searched and searched and searched again, and I cannot find any
help with this problem. There''s an identical problem on this forum, but
it was never resolved. I''ll try to re-open the subject with a bit more
information.
Problem: The form_remote_tag() method in my "list" view is not passing
the params[] hash of the values stored within my form.
2005 Dec 16
13
How to pass a collection to paginate?
There must be a better way to write this code:
@project_pages, @projects= paginate :project,
:per_page => 10,
:conditions => ["account_id = ?", account]
?!
If only I could pass the sub-collection
account = ...
@projects = account.project
to paginate, instead of letting it extract it with a find :all + sql
conditions
Alain.
--
Posted via
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
2006 May 29
9
design recommendations for authenticating users with lots of different attributes..?
I''ve been struggling a bit trying to figure out the best way to
design/implement a system with authentication/authorization, and was
hoping some of you may be able to offer some advice..
At the moment, I have a system with 4 different types of users -
clients, administrators, sales_reps, and public_users. I''m using
"Authorizing Users with Roles" from the Rails Recipes
2013 Oct 24
6
undefined method `paginate' for #<Class:0x567eb98> in Rails Tutorial
Hi,
I''m getting a undefined method `paginate'' for #<Class:0x567eb98> even
though I have gem ''will_paginate'' installed.
Inside the users_controller I have @users = User.paginate(page: params[:page
])
so I believe I set everything up to be correct.
Can you figure out why the method''s undefined, despite installing the gem?
--
You received this
2012 Feb 23
4
Undefined Method
Hi all,
I am currently trying to get a bunch of links to to display all the
related console records upon button click so e.g. If a user clicks on
the Dreamcast link then I would like it to display all records that have
Dreamcast stored as their console.
I have the following example code in my index class:
<%= link_to ''DREAMCAST'', games_path(:console =>
2010 May 16
3
searchlogic
Hey
The guys at the searchlogic google groups seem to be asleep -.-
They didnt'' grant me permission to post yet.
But anyways, right now, I followed the searchlogic tutorial found here
-http://www.binarylogic.com/2008/09/07/tutorial-pagination-ordering-
and-searching-with-searchlogic/
however, in that tutorial, the results of the find displays all my
items, before i even search for
2006 Apr 04
5
Database usage technique -- user-specified fields
Hello folks-
In one particular app, it would be useful for the customers to be able
to specify the significance (and presence) of fields. For example,
consider a CONTACTs database. User 1 wants to have phone1, phone2,
phone3, and User 2 wants to have 4 address fields.
Generically, this could be done by having a CONTACT with, say, 10
strings, 10 integers, etc. The user''s account
2006 Mar 18
3
paginate a collection
hi i want to paginate a collection found by complex sql query
how can i do
thanks
--
Posted via http://www.ruby-forum.com/.
2007 Dec 10
15
Scaffolding for pre-existing database table in 2.0.1
Hi,
first of all I will apologize in advance for my presumably noobish
question, but I''m only starting to learn Rails and am a little
confused with all the changes in 2.0.1. There are as good as no
tutorials out yet and the 2 or 3 screencasts I''ve seen deal with the
creation of both the app and the database.
Now my problem is that I already have a database with a fair amount of