Displaying 20 results from an estimated 20000 matches similar to: "How to get the source code for login generator"
2005 Oct 14
1
Diff between attr_accessible and attr_accessor
I''m going though the paper back edition of agile development with Rails. On
page #128 I encountered following lines of code:
attr_accessor :password
attr_accessible :name,:password
What''s the difference between attr_accessor and attr_accessible?
-=- Neeraj
_______________________________________________
Rails mailing list
2006 Nov 17
4
set empty values as null in the database
Le''s say that I have a table called people and the column middle_name is
nullable. If the user enters say blank or empty space then in the database
it is recorded as empty space. I would like in all my models all empty
spaces to be recorded as null.
I guess I can write a plugin which will do so for all the models but I''m
sure something like that should already be existing.I
2006 Aug 09
6
How to change the error message easy way
validates_presence_of :fname
results in the error message
"Fname can''t be blank".
What I want is "First Name can''t be blank".
I could do this
def validate
errors.add_to_base("First Name can''t be blank") if fname.blank?
end
I find this clunky and I have to put everyrhing in the validate method. Is
there an easy to get what I want.
I
2006 Jan 14
3
How to render from a different controller
My code is something like this.
class FirstController < ApplicationController
def foo
#some processing
render (:controller => ''second'', :action => ''index'')
end
end
I tried using both render and redirect but it seems it''s not possible to
send the control from within a controller to some other controller. Am I
missing something
2006 Jul 26
2
How to highlight the search term in the search result
In the ''basecamp'' product from 37signals if I search for ''ruby'' the I get a
bunch of results. In the search result page the search term (ruby in this
case) is highlighted.
I was wondering how to accomplish the same.
How to highlight the ''search term'' in the search result? Is there any
already existing utility that I could use?
Thanks.
2006 Apr 27
2
How to override pagination_links method
I intend to override pagination_links method.
I added following lines of code in application_helper.rb
module ActionView
module Helpers
def pagination_links(paginator, options={}, html_options={})
raise("boom!!")
end
end
end
But my code is not executing my code. The view is still using the method
pagination_links from rails.
What''s the correct way to override
2005 Mar 05
3
login generator problem
I am trying to use the login generator, but I keep
getting the following error when I run "generate login
Account":
/usr/lib/ruby/gems/1.8/gems/rails-0.10.0/lib/rails_generator/base.rb:84:in
`manifest'': No manifest for ''login'' generator.
(NotImplementedError)
from (eval):3:in `__send__''
from (eval):3:in `manifest''
from
2006 Jan 31
2
Relationship navigation issue
class Event < ActiveRecord::Base
belongs_to :venue
belongs_to :category
end
class Venue < ActiveRecord::Base
belongs_to :city
end
class City < ActiveRecord::Base
belongs_to :state
end
I want to retrieve all event records belonging to a state. Coming from
hibernate background I tried something like this:
def self.list_for_a_state(state_id)
find_by_sql(["select e.*
2005 Oct 20
2
Salted Login Generator Installation
Hi,
I am trying to install the salted login generator from
rubygems. I have version 0.13.1 of rails installed.
When I try to install the salted login generator (gem
install salted_login_generator) it asks:
Install required dependency rails?
If I select yes it says:
RubyGem version error: rails(0.11.1 not >= 0.13.1)
and fails. It does the same thing when I try to
install the regular
2006 Jul 05
2
How to write get functional test when there is no action by that name
I have following line in route.rb
#event info for an event name
map.connect ''event/:name_url'',:controller => ''home'',:action =>
''event_info''
It causes a URL like http://localhost:3000/event/_jewels_exhibition_ to be
sent to the home controller with action as ''event_info''.
I am trying to test this action. My first
2005 Mar 06
3
Accessing login name from login_generator
I''m new to Rails and am modifying the ToDo tutorial app into something
else. I have successfully installed authentication via login_generator
and now I working toward restricting access to certain database records
based on the login name. I realize that eventually, I''ll want to use
the "id" field, but for now, I just want to use the user name itself.
I have
2006 May 04
3
error in installing login generator
hi guys,
i tried to install login generator following these steps:
first i open the forlder where my application is saved than writing in
the commad prompt: gem install login_generator, then ruby
script/generate login
but it didn''t work i got this error
Recognition failed for "/account%20/login"
what should i do, or did i miss any step
thanks
--
Posted via
2006 Jan 20
2
select_time issue: how to get hours only upto 12 along with AM/PM
My code is like this:
<%= select_time () %>
1) I would like to pass more options so that the a blank value is at the
top. I tried ":include_blank => true" but it didn''t work.
2) I would like to limit the number of hours to only upto 12. With the
current code the hours has value rangin from ''00'' to ''23''
3) Would like to have
2006 Oct 25
12
NameError, uninitialized constant States
I''m completely new to Ruby and Rails and could use some help resolving
an issue. I have a list method that is supposed to show the titles and
states(status) of requests, but I get an error from this piece of code:
<td><%= change.states.state %></td>
The error is:
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:100:in
2007 Feb 02
3
rails command version pegging?
Hello,
Is it possible to declare the version of Rails used with the seminal
"rails /path/to/my_app" command?
For example, I now have 1.2.1 and 1.1.6 installed on my machine. If I
run "rails my_app" I get 1.2.1 produced skeleton code. Is there a way
to get 1.1.6 results?
Regards,
Andy Koch
--~--~---------~--~----~------------~-------~--~----~
You received this
2005 Jul 05
2
Salted hash login generator (verification problem?)
Hi all,
I hope someone can help with what is probably a simple newb
installation mistake on my part. I''m having a couple of problems with
the salted hash login generator. I installed it following the
quickstart guide, and the unit tests work like a charm. There are two
errors and a failure on the function tests, though; the verified field
seems to be involved in at least one of
2005 Apr 29
2
problem installing login generator on windows
Hi,
I had a non-fatal problem installing the login generator on Windows w/
rails 0.12.1. Has anyone else run into this or know what''s wrong?
c:\devel\ruby>gem install --source http://dist.leetsoft.com login_generator
c:\devel\ruby>"c:\devel\ruby\bin\ruby.exe" "c:\devel\ruby\bin\gem"
install --source http://dist.leetsoft.com login_generator
Attempting local
2007 Jan 29
2
What does Reloadable mean in rails source code?
In the actionpack-1.12.5\lib\action_controller\base.rb,
you can see the definition:
class Base
include Reloadable::Subclasses
...
And following is the definition of Reloadable:
# Classes that include this module will automatically be reloaded
# by the Rails dispatcher when Dependencies.mechanism = :load.
module Reloadable
class << self
def included(base) #nodoc:
raise
2011 Mar 15
1
Ast 1.8_CentOS5.5 with timerfd as timing source
Hi All
Just finished setting up a vm with centos 5.5 and asterisk 1.8.3
Using timerfd as a timing source.
Has anyone got a similar setup in production ?
How's performance?
Thanks,
Neeraj?
2006 Apr 25
12
Newb Gem Install Help!
This seems newbish, but I can''t seem to get this gem to install no
matter what I do. The gem in question is login_generator, and no matter
what folder I put the .gem file in, it can''t read locally - am I missing
something?
Remote install hangs at updating the source.
--
Posted via http://www.ruby-forum.com/.