similar to: contents of /lib automatically loaded?

Displaying 20 results from an estimated 40000 matches similar to: "contents of /lib automatically loaded?"

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 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 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 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 May 29
1
need help with gettext
I''m following the wiki instructions for using gettext: http://manuals.rubyonrails.com/read/chapter/105 I run ''rake updatepo'' and it creates a myapp.pot file in rails_root/po. I then create a sub-directory (rails_root/po/en_GB) and copy a translated myapp.pot into it. When I run ''rake makemo'' it doesn''t create a ''locale''
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 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 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 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 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 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.
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 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
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 Jul 18
8
Including files from lib/
I asked about this a few days ago and got no replies, so I''m asking again. I have a file called string_extensions.rb. In it, I extend the String class to include some extra functionality. I put this file into the lib/ directory of my app. But the changes made to String don''t take effect. The program acts as though the files aren''t being included. I''ve stopped
2006 Apr 07
3
*dont* empty the database...?
I''d like to test against a very large dataset - is there anyway to prevent the data in the test database being destroyed on each test run? storing the dataset in fixtures causes the tests to take several minutes to complete, even using csv fixtures, and that''s just for one test case! I''d appreciate any suggestions on how to preserve the data in the test database
2006 Jul 17
10
getting the user name
Hi I am new to ruby and trying to obtain the user name in the login index.rhtml where I could display "You have logged in [user name]" How could I do this? I have been trying different options after reading the ruby manual but still throw an error. please help -- Posted via http://www.ruby-forum.com/.
2006 Jun 01
3
Requiring /lib files in a cross-platform way.
Hi. When you have library foo.rb in your Rails project /lib directory, I notice that on some platforms - e.g. Windows with WEBrick as a server - you can require it by simply: require ''lib/foo'' However on other platforms - e.g. Debian with Lighttpd server via FastCGI - this does not work, and you need to specify RAILS_ROOT explicitly, like this: require
2006 Jul 17
3
functional tests run fine on their own but fail with rake
this is a weird one. i have 8 functional tests classes. when I run them individually, they all pass. When i use rake or ''rake test:functionals'' one of them fails. I''ve traced the error back to a problemwith reading data from the session. when running the tests individually, the data is there. when run using rake, it''s nil. has anyone come across anything