Displaying 20 results from an estimated 29 matches for "balfour".
2006 Apr 27
5
def list - paginate question
How do I adapt this code to only list articles made by the user logged
into the session?
def list
@article_pages, @article = paginate :articles, :per_page => 10
end
--
Posted via http://www.ruby-forum.com/.
2006 Apr 11
4
find(params[:id]) question
Admin Controller -
def show
@wizard = Wizard.find(params[:id])
end
View -
<td><%= link_to ''Show'', :action => ''show'', :id => wizard %></td>
URL -
http://localhost:3000/admin/show/1
I want user_name (one of the columns in the database) instead of the id
to show
For example:
2006 May 16
5
Google Map problems
I followed the setup from http://cartographer.rubyforge.org/
but keep getting this error -
NoMethodError in Sandbox#map
Showing app/views/layouts/sandbox.rhtml where line #4 raised:
You have a nil object when you didn''t expect it!
You might have expected an instance of Array.
The error occured while evaluating nil.[]
Extracted source (around line #4):
1: <html>
2: <head>
2006 Apr 18
4
IN-PLACE FORM EDITING
Ive been following the rails recipes (great book) and wanted to have a
larger a text field when editing in place.
The chapter it mentions that I can "force the InPlaceEditor to create
either a text ?eld or a <textarea> ?eld, using the :rows option to
in_place_editor_?eld( ). Then any value greater than 1 will tell
InPlaceEditor to generate a <textarea>." It
2006 Jun 26
9
Form Mail
What is the most RoR friendly way of making a form mailer similar to
this php one?
http://tips-scripts.com/?tip=form_mail#tip
Or is it easier just to use the php with RoR?
--
Posted via http://www.ruby-forum.com/.
2006 Apr 25
5
Authorisation question
My authentication (signup/login) is up and running in my app, now I need
to implement an authorisation system. Its not going to be a complex
one. One admin (me) and then normal members and premium members. Any
tutorials or tips on a simple way to get this running? Thanks.
--
Posted via http://www.ruby-forum.com/.
2006 Jun 07
5
little Live search problem
Works fine but when you use backspace or delete on the search word and
it hits 0 characters it displays ALL the Test names in the database!
def live_search
@phrase = request.raw_post || request.query_string
a1 = "%"
a2 = "%"
@searchphrase = a1 + @phrase + a2
@results = Test.find(:all, :conditions => [ "test_name LIKE ?",
@searchphrase])
2006 May 18
3
Google Map
Used a great howto @
http://iamrice.org/articles/2005/12/09/using-google-maps-in-the-uk-with-rails
for using google maps on uk sites. Just having one issue I can''t seem
to work out how to draw the postcode from my table I keep getting hit by
method errors.
The controller is
require ''postcode_2_latlong''
postcode = Postcode.new("TN22 2LG")
# I want this to
2006 Apr 14
6
Login Generator with Extensible authorisation
I want my web app to have a signup/login generator but have 2 tiers of
users - normal and premium. There seems to be lots of login generator
and engines with scattered tutorials about extensible authorisation and
Im lost as which is the ''best'' or most ''easy to use'' solution. Anyone
had success in this area?
--
Posted via http://www.ruby-forum.com/.
2006 Jul 18
1
Ajax contact form
http://depot.iamjp.com/contact
Great example of what I need above, I just can''t work out how to turn it
from a demo to a working contact form! (yes im dumb)
--
Posted via http://www.ruby-forum.com/.
2006 Jun 02
2
I need help with my 1st sortable list!
Ill keep it brief. Dragging an item is working but dropping and
updating the list gives me this error -
NoMethodError in AdminController#sort
You have a nil object when you didn''t expect it!
You might have expected an instance of Array.
The error occured while evaluating nil.each
#{RAILS_ROOT}/app/controllers/admin_controller.rb:171:in `sort''
# My view -
<ul
2006 Jun 14
1
file column validates_format_of
Been manually testing file column with success except it seems to upload
the file before validating it. Also .pdf files (which shouldn''t even
validate) crash WEBrick. What am I missing to solve these problems?
(apart from a brain!)
validates_presence_of :title, :file
validates_format_of :file, :with => %r{.(gif|jpg|png)$}i,
:message => "File must end with .jpg, .gif or
2006 May 04
1
Ferret and rails question
Is ferret the best way to implement a search option in your app?
If so what is a best way to do it - the plugin or the wiki tutorial?
--
Posted via http://www.ruby-forum.com/.
2006 May 05
1
hows does engines effect the default action mailer?
I installed engines to my app and now my salted login (which is not an
engine) wont send emails. Bit confused... :S
--
Posted via http://www.ruby-forum.com/.
2006 Apr 10
1
column.name question....
rHTML is
<% for column in Wizard.content_columns %>
<p>
<%=h @wizard.send(column.name) %>
</p>
<% end %>
It outputs:
Robs Site
Heading
logo.jpeg
London
------
Bascally 1 line for each column in the database. How do I edit the
rhtml so I can break up the output?
For instance JUST have ''Robs Site'' display nothing else. That mysql
column is
2006 Apr 20
2
Salted Login Generator glitch
I followed the tutorial here
http://wiki.rubyonrails.com/rails/pages/SaltedLoginGeneratorQuickstart
and didn''t have any problems. Actionmailer is working fine. When I
sign up I get the email saying "Please click on the following link to
confirm your registration"
When I do i go to the default page with "Welcome. You are now logged
into the system..."
So I thought
2006 Apr 27
2
NoMethodError - why?
Getting this error when hitting update.
NoMethodError in Article#update
You have a nil object when you didn''t expect it!
You might have expected an instance of ActiveRecord::Base.
The error occured while evaluating nil.update_attributes
Source code.
def create
@article = Article.new(params[:article])
@article.user = @session[''user'']
if @article.save
2009 May 20
3
ZFS ACLs
I have OSol 2009.06 (b111a), and I''m not sure I''m getting this ZFS ACL
thing:
%whoami
abalfour
% ls -V file
----------+ 1 abalfour root 1474560 May 11 18:43 file
owner@:-w--d--A-W-C--:-------:deny
according to that ACL I shouldn''t be able to write anything having to do
with file, correct?
% cat >> file
zsh: permission denied: file
% mv file foo
mv: cann...
2006 Apr 13
3
Salted Hash Login Generator problem
Im trying to install salted and get errors when running the rake test...
/usr/bin/ruby1.8 -Ilib:test
"/usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake/rake_test_loader .rb"
"test/unit/localization_test.rb" "test/unit/user_test.rb"
Loaded suite
/usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake/rake_test_loader
Started
........F....E
Finished in 0.108794 seconds.
1)
2006 Jun 03
8
dtrace causing sigtrap?
Just to let people know what my big picture is, I''m trying to write a script
that will let me run a program, and name a progeny of that program
that I want to debug. My script should find the first occurrence
of that progeny, and run it until it finishes initializing the
runtime linker, but stop it before it runs any shared library startup
routines. (Failing that, I''d be okay