Displaying 20 results from an estimated 300 matches similar to: "[Markaby] select with acts_as_dropdown problem."
2006 Aug 14
0
acts_as_dropdown: NoMethodError on load
Rails 1.1.6 on gems
I had the acts_as_dropdown plugin working fine, but now starting webrick
gives me a:
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:1129:in
`method_missing'':
undefined method `acts_as_dropdown'' for User:Class (NoMethodError)
My other plugins are working fine.
I have the latest version of acts_as_dropdown.
Gems are
2006 Jun 21
0
acts_as_dropdown
Hi
I am currently using the acts as drop down to create select lists.
Is it possible to use this blogin to create grouped select lists.
(ie one list, but with bold headings above groups of names)
thanks,
scott
--
Posted via http://www.ruby-forum.com/.
2006 Apr 25
3
select boxe
yop,
http://rubyonrails.org/api/classes/ActionView/Helpers/FormHelper.html
ici j''ai vu qu''on pouvait g?n?rer des ?l?ment d''un formulaire gr?ce des
m?thodes. Apres quelque petite recherches j''ai trouv? comment g?n?rer un
select
<%= select(''category'', ''category.id'', Category.find_all.collect {|category|
category.nom})
2006 May 14
4
searching on foreing keys
Hey all,
I''m using a simple search function. It''s working
great except for foreign keys.
I have one table pets (id,name,owner_id)
and another table people(id,name)
owner_id being a foreign key of pet pointing to people name.
here it is on the pet controller:
@paginator, @pets= paginate(:pets, :conditions =>["name OR owner_id
like
2008 Jul 08
4
Conditional "link_to" helper function - AYUDAME POR FAVOR
Hello,
I need to write a function that will return a link only if the current
user is the owner. Here is my code...
1. application_helper.rb
2.
3. def link_to_if_owned(owner_id, anchor_text, where_to_go)
4. if current_user.id == owner_id # current user is owner
5. "#{link_to anchor_text, where_to_go}"
6. else
7. anchor
8. end
9. end
And
2007 Feb 25
1
Relationships question (?)
Hello there,
Im currently taking a Senior Design Course at my college. We are
developing an online document editor prototype with Rails.
I am not well-versed in Rails. As a matter of fact, we chose it for the
project in order to learn it.
The problem we have is the following:
We have a User model (id, username, password, email) and we have a
Document model (id, name, content, owner_id). A
2005 Mar 08
1
Adding to model (newbie)
Sorry if this is a really lame question, I''m sure it''s something fairly
obvious, but I just can''t see it at the moment...
I''m trying to add something simple to the model for a project
management/todo list/thing. The DB has ''first_name'' and ''last_name'',
and I''d like to have "full_name" available.
So -
2006 Apr 24
4
creating a select box
Hi
trying to create a select box in _form.rhtml.
I have a table called organisations that contains fileds, 2 being ''id''
and ''name''
these are the fields I need to bring over to the clients _form.rhtml.
whats the best way of going about that??
2 ways i have seen suggested that I cant get to work
-@organisations = Organisation.find_all placed this in def new
2006 Sep 12
1
Use of xvfb : X11 cannot allocate additional graphics colors. Consider using colortype="pseudo.cube" or "gray"
Hi,
I use R in remote access on a Debian server.
I need X11() to create graphical things so I use xvfb-run (Virtual X server
environnement) R to allowing X11() capabilities to R.
An other technique is to connect in shh -X to execute my R script.
With the connection ssh -X, my R script is well executed. BUT when I use Xvfb,
some graphics are created but an error occured and stop the script.
2010 Feb 14
2
has_many :through eager loading only loading one record
Hello,
I''ve been using Rails for years, including has_many :through and eager
loading, but this one has me stumped.
The problem is that Active Record is only eager-loading the first of
many records. Here are the models (note set_table_name for a legacy
schema):
class Tag < ActiveRecord::Base
set_table_name ''tag''
end
class DishTag < Tag
has_many
2006 Jul 11
2
Summerising users subfolders imap logs?
Hello.
Migrating from pop3 to imap I have now situation, that every user has a
lot sub folders, for example 100 sub folders and now every mail check
writes in the mail log also login/logout log for every sub folder:
dovecot: Jul 11 16:16:31 Info: imap-login: Login: anti, [192.168.20.1],
PLAIN, TLS
dovecot: Jul 11 16:16:31 Info: IMAP(anti): Disconnected in IDLE
dovecot: Jul 11 16:16:31 Info:
2007 Aug 17
0
map.with_options :path_prefix => ''
Hello,
I am getting a ''No route matches'' error in rspec with routes that have a
path_prefix composed by map.with_options. Rails recognizes the routes just
fine and the site works, but I can''t get the specs to pass unless I put the
prefix in each individual route. Any help is appreciated.
My foo model has a polymorphic owner which is what I want the path_prefix to
2006 May 29
0
using components to reuse code
the following is the code of the controller, under the dir
components/test/:
class Test::GroupsManController < ApplicationController
uses_component_template_root
def add_to_group
@account = Account.find_by_nick(@params[:nick])
# render :text => "#{session[:account_id]}
#{Group.find(session[:group_id]).owner_id}"
if (session[:account_id] ==
2006 Mar 22
1
How do you clean up this cryptic code?
So, I''m coding my school project in Rails.
There are two models, User and Restaurants.
I noticed that in Restaurants, when you use the belongs_to method, you
could specify the condition of the associated table. There are a few
types of users, in the user_type column of the users table - owners is
type 1, users are type 2.
So in my haste to hand in enough code, in the Restaurant model,
2008 Jan 10
0
BUG? has_many :through makes funny queries
So I have this structure.
class Gallery < ActiveRecord::Base
belongs_to :owner, :polymorphic => true
has_many :folders, :order => ''slug'', :dependent => :destroy
class Folder < ActiveRecord::Base
has_many :photos, :dependent => :destroy, :conditions => "parent_id IS
NULL"
belongs_to :gallery
class User < ActiveRecord::Base
has_one
2008 Jun 13
6
Newbie question on has_many
I have two classes: a Widget and a User. The User has an id that is
referenced in two places on the Widget: owner_id and operator_id.
How should I structure that reference for has_many?
Thanks folks - I appreciate any help on this.
--David
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2007 Jun 27
0
QueueMetrics 1.4 released today
Hello list,
After a few months of developement, we are proud to release QueueMetrics
1.4.
This release adds a very large number of new features and bug fixes, for
example:
- New master engine! It should be 4x faster and 2x as memory efficient as
QM 1.3, though it's tracking much more information. It's 100% compatible
witth the old configuration switches.
- New clustering engine!
2004 Aug 06
0
a new directory service
Jack Moffitt wrote:
> So I've been doing some research and thinking here and there about what
> a _good_ directory service for icecast would be like. I'd appreciate
> some feedback and some discussion on this topic, before I start putting
> a lot of effort into developing it.
As I'm involved witth broadcasting a traditional radio station on the
net, the important thing
2006 Apr 30
3
require "ajax_scaffold" in model error
Hi there,
I''ve got installed ajax_scaffold_generator (3.1.2, 2.2.1)
Anyway I''m following the example here <http://height1percent.com/
articles/2006/04/18/ajaxscaffold-3-1-0-released> which suggests the
following in a model file:
--------------------------------------------------------
require ''ajax_scaffold''
class Pet < ActiveRecord::Base
2006 Oct 13
1
Edge rails, single table inheritance and keeping multiple classes in a single file
So is the official stance as per edge rails that multiple class
definitions must go into separate files? I was trying to use STI with
acts_as_attachment, to have all my attachment classes go into a single
file, for example:
attachment.rb
class Attachment < ActiveRecord::Base
end
class UserPicture < Attachment
belongs_to :user, :foreign_key => ''owner_id''