similar to: how to use own classes properly

Displaying 20 results from an estimated 1000 matches similar to: "how to use own classes properly"

2006 May 04
5
create databases with rake
hi, is there a way to create the database (say development and or production) specified in database.yml with rake? thanks, Enrico -- "The only thing necessary for the triumph of evil is for good men to do nothing" Edmund Burke
2005 Mar 07
3
exclude an attribute from save
Hi, I''ve used .save to save the attributes, but on my table there is an autoincrementing id (not the primary key) that doesn''t need to be inserted... but save try to INSERT it anyway... is there a way to avoid save from acting this way or to whisper him to be more polite this time? ;) Thanks, Enrico -- "The only thing necessary for the triumph of evil is for good men to do
2005 Jun 21
3
dynarch calendar problem when used with ajax
I''ve got a partial with a form using the dynarch calendar (calendar_field behavior). Working. Now I render this partial from the action specified in to a link_to_remote. Now when I click the calendar it''s not showed anymore. theese lines: <%= stylesheet_link_tag ''calendar-system.css'' %> <%= javascript_include_tag ''calendar'',
2006 May 12
4
validates_uniqueness_of with a condition
Hi, I need to check the uniqueness of an attribute (a doc number) using a condition (a specific year), I''ve found validates_uniqueness_of :number, but I need to tell it I just want to check a specific year. I''ve found :scope but I haven''t really understood it''s meaning, Can I scope on a specific year? Thanks, Enrico -- "The only thing necessary for the
2005 Mar 08
4
change the model''s table name
I need to change the name of the table a model is connected to... like the example in the API... the table is called mice and I want a class called Mouse. class Mouse < ActiveRecord::Base table_name "mice" end I''m doing this cause I want tables in my language (italian) and avoid the nameS thing. just adding it in that way doesn''t work ArgumentError in
2006 Feb 04
2
file_column path problem grouping controllers in to modules
Hey there, good job with the file_column thing, but I''m experiencing a problem I didn''t found about. I''m grouping controllers in to modules (like Admin::Category Admin:Item) and: url_for_file_column("dettaglio", "picture_url") return this search path: src="/detail/picture_url/development/5/dark.jpg" there''s a development coming from
2006 Feb 10
2
file column within link_to
Hi, I correctly see: image_tag url_for_file_column("element", "picture_url", "medium") now I need to make it a link so I''ve used: <%= link_to(image_tag url_for_file_column("element", "picture_url", "medium"), {:controller => "products", :action => "sec_level", :level_id => @element.id}) unless
2006 May 04
5
How to upload only jpeg & gif & png images into public/images using rubyonrails
Hello iam new to rubyonrails. Please any one help me out in "How to upload only jpeg & gif & png images into public/images using rubyonrails" Thanks in Advance -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060504/33a17ad2/attachment.html
2006 Aug 18
6
Prevent user from accessing an image
Hello, I''m using file_column to save my users images. It''s all OK, but I want to prevent one user from accessing other user''s image. Is it possible, as the image is saved in the file system ?? Thanks Parra -------------- next part -------------- An HTML attachment was scrubbed... URL:
2006 Jan 09
6
Nil column results, possible to ignore?
For a table "clients" there are city, state, and zip fields. However, for some clients we only have a state with no actual address. The following code throws a "You have a nil object" error when outputting my client list. Is there a way around this, short of writing a specific case for each possibility? &lt;%= client.city + '', '' + client.state +
2006 Jun 28
9
Scaffold Issue with Postgres
Hi guys, I''ve been able to successfully install the postgres adapter for a remote database machine to get rails up. My machine is running on Fedora 2. Rails version 1.1.2. Is my yml config correct? I am getting this error when I execute script/generate scaffold service_contents content : exists app/controllers/ exists app/helpers/ create app/views/spiel exists
2006 Jul 04
1
select(object, method, choices, options = {}, html_options = {})
Hi, I''m using: select(object, method, choices, options = {}, html_options = {}) I''ve read the API where there''s this example: select("post", "person_id", Person.find_all.collect {|p| [ p.name, p.id ] }, { :include_blank => true }) should give this code: <select name="post[person_id]"> <option></option>
2006 Apr 19
2
ubuntu 5.10 postrgres gem
Hi, I''ve installed Ubuntu 5.10, with Ruby 1.8.4 with thoose rep: deb http://www-devel.orcaware.com/packages/ubuntu/ breezy/ deb-src http://www-devel.orcaware.com/packages/ubuntu/ breezy/ when I give: sudo gem install postgres I get: Attempting local installation of ''postgres'' Local gem file not found: postgres*.gem Attempting remote installation of
2005 Sep 30
2
klibc loader crash...
Hi all, I've a simple program called empty.c :) $ cat empty.c int main(int argc, char* argv[]) { return 0; } $ cat empty410.s .file "empty.c" .text .p2align 4,,15 .globl main .type main, @function main: xorl %eax, %eax ret .size main, .-main .ident "GCC: (GNU) 4.1.0 20050922 (experimental)"
2006 Aug 08
2
validate data
Can anyone help me?? I validate a form-field: protected def validate errors.add(:name, "should be longer than 2 chars") unless name.length <= 2 end I want to check the variable name. It should have a size over 2 characters. But my function "validate" doesn''t run! Why ??? -- Posted via http://www.ruby-forum.com/.
2006 Feb 02
4
Portal behaviour - beginner question
Hello, I''m still reading the Pragmatic pdf for ROR. I intend to port a small web-based soccer simulation game that a friend of mine wrote in php. I still have in mind the basic cart application that can be found in the pdf. The main pages in the game typically display multiple statistical views (past games, player efficiency, ...) In my basic mind, this would involve calling
2005 Mar 02
1
postgresql date
If I select my date column from the pgadmin I see that in the ddmmyyyy form, I''ve specified so in the postgresql config. When I query from rails I get the date in yyyymmdd someone knows why? Thanks Enrico -- "The only thing necessary for the triumph of evil is for good men to do nothing" Edmund Burke
2006 Feb 16
4
Problems to test controllers which require login
Hi there, I have a quite stupid problem with my testing environment. I''m trying to test my controllers but every controller with a login rewuirement will fail (because there is no logged in user in the session). I realized the conceptual problem behind this, but I''m not able to solve it. What I have done so far: * Login in the test class as described in the Agile Rails Book.
2015 Mar 05
3
Dovecot Full Text Search results in SolrException: undefined field text [SERIOUS]
Hello, My dovecot constantly runs into this error. I want to fix this one last time, I am tired of troubleshooting so please someone give me a lasting and proper solution for this error. I think its a problem with the dovecot-solr module. Please tell me how do I find the root of this problem with Dovecot. There is a problem with the body search text field. It always fails(with no result), other
2011 Apr 04
1
[LLVMdev] opt -dot-cfg
I use "opt -dot-cfg sample.bc" command to view cfg, but I encountered the following warning. WARNING: You're attempting to print out a bitcode file. This is inadvisable as it may cause display problems. If you REALLY want to taste LLVM bitcode first-hand, you can force output with the `-f' option. I see unmeaning thing when use -f , in additinal I've installed graphvis