Displaying 20 results from an estimated 36 matches for "liststuff".
2006 Jun 24
2
contents of /lib automatically loaded?
I''ve written a simple replacement (not extension) of Ruby''s array class with
some added functionality. I defined it in array.rb and put the file in
rails_root/lib but when i fire up the console the class isn''t being loaded.
How can I have my class automatically loaded and used instead of the built
in Ruby class?
2006 Jun 24
2
gettext and maintenance
hi all
my app has two languages, I''m using gettext to manage them and so far so
good. My question is about maintenance. If I fix a typo in a _() enclosed
string, for example in an rhtml file, then the translated version of that
string will no longer be valid will it? even if the translation itself had
no errors. Is that the case and if so will i be forced to have the _()
string
2006 Jul 13
4
why I don''t like to use some 3rd party plugins
I''m not a professional developer in the sense that I''ve had any formal
training or experience. I taught myself programming two years ago and have
since moved to ruby and shortly after to rails - even now, i only develop as
a hobby. This means that a lot of developer best practises are foreign or
unknown to me, that''s why I love rails so much. You learn so much just
2006 Jul 27
7
''remember me'' using cookies
I''m about to implement this, and I''m thinking of storing the user''s id and
their hashed password in the cookie after a successful authentication.
can any see an obvious security issue with this? I know the method is
vulnerable to cookie theft but am i missing anything?
thanks
alan
2006 Aug 16
15
OT: finding a designer (bit of a rant)
I''ve written my app already. It outputs valid xhtml and I need a stylesheet
to drop over the top. How hard is it for people to understand that?
It''s a small project, they''d have to do the main design/layout, and then a
little custom styling for some specific elements which don''t appear on every
page. That''s the point of CSS right? write once, use
2006 Jul 12
3
How to get the current URL?
Hi,
how can I get the current URL withing a controller? There seems to be no
appropriate method in ActionController::Base.
I''m creating a site, which requires a login for some pages. I''m using
before_filter for authentication. My idea was to store the currect URL
in a session before redirecting to the login page and then redirect to
this URL after successful authenfication.
2006 Jul 13
1
fixtures getting a little hard to manage
I have lots of tests which rely on fixtures being a particular state in
order to pass. For example, one test checks that a User object can have no
more than 3 associated ''Page'' objects at a time. That''s a simple example but
I have more complicated tests too. The problem is I sometimes add a fixture
without realising it''ll affect the tests and everything
2006 Jul 13
3
Validation question
If I am validating an object before it is saved and do a find(:all) of
that object class, will the object which is being validated be returned
by
the find method?
something like:
class Resource < ActiveRecord::Base
def validate
resources = Resource.find(:all)
..do stuff
end
Will the object I am validating be in the ''resources'' array?
Thanks in advance,
Don Mc
--
2006 Jul 22
2
fetching records from tables
Dear all,
I have a doubt,
How to fetch records from tables, which are not having ID field as its
primary key.
If possible, please tell me to way to extract data from those tables.
--
with regds,
Nahalingam N. Kanakavel.
(http://www.nahalingam.bravehost.com/PlanetN/)
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2006 Apr 02
3
FeedTools syntax question
http://www.mozdex.com/open.jsp?query=webhosting&start=10
in the above feed, can anyone tell me how to access the
openSearch:totalResults element using feed tools? I can access the other
elements, but I''m unsure what special meaning the colon carries or how to
work with such items in feedtools
thanks in advance
al
2006 May 26
3
capistrano on windows (again)
Hi all
I didn''t get a response to my first post so I thought I''d try again. is
anyone successfully using capistrano to deploy their app from a windows box?
I''m trying to deploy a test app to my dreamhost account but all i get is
"rake aborted!" with no further information. Can someone please confirm if
capistrano even works under windows?
many thanks
al
2005 Apr 28
5
fcgi woes
Hi all
I''m running rails on apache with fcgi under windows
I have a module which I''ve included in one of my models, but if I
change any code in the module, i have to restart apache in order for
the changes to take effect. i tried some suggestions from folks in
the IRc channel, namely to put RAILS_ENV = ''development'' in
environment.rb but that doesn''t
2006 Jul 19
5
weird result for a custom attr reader!
Hi all,
I am having a weird problem reading a value from my model. basicaly, I
have these two models:
class Category < ActiveRecord::Base
acts_as_tree :order => "name"
belongs_to :item_type
has_many :specific_category_names
end
and
class SpecificCategoryName < ActiveRecord::Base
set_table_name "Specific_category_names"
has_many :products
belongs_to
2006 Apr 25
5
to ajax or not to ajax
before I started building my latest rails app, I made the decision to make
good use of ajax. My reasonsing was that users would benefit from the
quicker page updates - the application provides various different types of
insurance quotes, and has several multi-page forms and reports that can be
drilled down 5 or 6 levels deep in some cases - so it seemed like a good
candidate for ajax
Now
2006 Jul 22
3
Connection refused - connect(2)
Dear all,
Please help me in this regards,
I am using models to access LegacySchemas using
set_table_name and set_primary_key...
[code for model]
class CdDetails < ActiveRecord::Base
def self.find_data
set_table_name ''cd_details''
set_primary_key ''cd_label''
find (:first,
:select => "cd_label")
end
2006 Jul 18
16
Session is being shared between tabs!!??
I have just spotted quite a serious problem with my rails app. My app
uses the session to store information. Most people who use the app may
have more than one instance of it open in their browser (multiple tabs).
The session stores which country the user has selected. On each browser
tab the user may select a different country. You can add items to a
country. There are problems with
2006 Aug 07
0
writing an acts_as_* plugin
does anyone know of any documentation other than the article on the wiki
about how to write an acts-as_* plugin? the code in the wiki article is good
enough to get me started but I''d like to understand the code rather than
just copy it.
thanks
alan
2006 Aug 09
0
class validations - instance equivalent?
does anyone know if it''s possible to use rails validators from validate()
I have some conditional validation to do, and using :if => Proc.new... on
the class validators is getting messy, so I''m doing the condition checking
in one place - validate() - except of course I can''t use rails validators
there. I''ve started writing my own validators but I hate to
2006 Jul 07
0
keeping error messages out of the model
I know this has been discussed before on the list but I can''t seem to find
the topics on gmane.
I''d like to display different validation error messages depending on the
context e.g. users choice of language and users choice of interface (I have
a simple/advanced interface for my app). I''m wondering if someone has come
up with a clean way of separating the error
2006 Jul 11
0
view/manipulate session data in integration tests?
how can I view or change the contents of the session in an integration test?
I know in functional tests you pass a hash containing the session data to
get/post but how is it done in integrations tests?
can someone point me in the right direction?