similar to: attribute or instance method or what?

Displaying 20 results from an estimated 400 matches similar to: "attribute or instance method or what?"

2006 Mar 09
2
How to keep formatting of text in textarea?
Hi! I''ve got a form for creating news and i''d like to keep formatting of the text in the textarea - if user presses enter twice, or presses space ten times it should be visible when editing or showing the news. Probably i should add before_save filter and some regexps for adding html tags, but i know almost nothing about regexp. Maybe there''s a simpler way also.
2006 Mar 09
7
How to restrict access to admin part of the page?
Hi! What is the easiest way to restrict access to some part of the page? In php i just put .htaccess and .htpasswd files in /admin folder and it worked. Now i''ve got one admin folder for controllers, one for views, public folder and i''m not really sure if it''s still possible. So what is the easiest way? I don''t have any user logging features on my site,
2006 Mar 08
3
Many renders in one view?
Hi! This was probably asked many times, but i can''t find it anywhere. How to render in my view many actions (sometimes from different controllers)? So i.e. I will have user status/login form at the top, form for creating/editing some data on the left and a list of these data elements on the right and some other things at the bottom? Can i put some of this stuff to the layout? So i
2006 Mar 14
3
How to write ! version of non ! method?
Hi! How to write i.e. array.join! based on array.join method? -- Posted via http://www.ruby-forum.com/.
2006 Mar 22
4
How to write this SQL query?
Hi! Is there rails version of "where column in (value1, value2, ...)"? I know i could do OR many times, but this way is shorter. I''m ruby/rails newbie, so i have a problem with converting the hash, which i''m receving from the search form into the string for :conditions in find method. Could i instead of creating one, complicated (for me) query do something like
2006 Mar 08
19
Creating multiple rows with one form
Hello. I''ve been trying this out for the past two days and I can''t seem to get it. I''m going to have a page where you can upload x amount of images at once. Lets say 10 images need to be uploaded, all with a caption. I''d like to have a browse button to choose the file, then the caption. Now, if I put 10 of them in one form, fill them all out and submit, I get
2006 Mar 14
3
How to save parent and child objects in a single action?
Hi! I''m struggling with it for a week. I posted a few similar posts that cleared up few things (thanks Mark!), but i still don''t know how to do it properly. What i''m trying to do is to create parent object and its many children (images - i tried using file_column, but it''s a topic for another post)using data from a single form. I''ve got a working
2006 Mar 13
6
Specifying none/single/many conditions at the same time
Hi! It''s rather ruby question than rails... I have a single ''list'' action where i call paginate method. I can receive none, 1 or 2 variables that specify conditions for paginate method. How to write the code so i can call paginate without conditions if all conditions variable are nil, with a single condition if one of conditions variables is not empty and with 2 if
2006 May 25
7
Grouping controllers
I''m grouping controllers to avoid cluttering the top-level namespace. First, I used script/generate Admin::Customers new edit show list and then I used script/generate Admin::Providers new edit show list. The generator created the subfolders correctly: I have an admin folder and inside there''s customer_controller.rb and provider_controller.rb. I have the same structure in
2009 Nov 14
2
Error Dialplan ?
Hi I have a problems with a new Asterisk Server, when i want call, i have: [Nov 14 09:12:38] NOTICE[31992]: chan_sip.c:18160 handle_request_invite: Call from 'PHISIP000001' to extension '00420225352184' rejected because extension not found. but into my extensions.conf: exten => _00420X.,1,Set(CDR(CodeTier)=CZE) exten =>
2006 Apr 21
1
Which internationalization plugin to choose?
Hi, I need to create rather simple page (gallery + news), but it has to be in 3 different languages (polish, english, german). Which plugin do you recommend? How to store translated data in the database - in a single table with separate field for every language or in separate table for every language? -- Posted via http://www.ruby-forum.com/.
2006 May 03
1
Globalize app example anywhere?
Hi! Is there anywhere tutorial how to create working application using globalize plugin? I need to create a site in 3 different languages and i was suggested to use globalize plugin. I''ve read a bit on globalize wiki page and pdf from the presentation available on the same page, but i still can''t figure out how to use it. 1. Can i translate names of models and columns
2011 Nov 22
3
making scatterplot easier to read
Dear R users, do you know an easy way (other than star plot) of making several points laying one over another visible? Is it any simple way of increasing such "multipoint" symbols - or shifting their positions randomly to make several points in one place visible? Cheers, sz. -- Szymon Drobniak || Population Ecology Group *Institute of Environmental Sciences, Jagiellonian University
2007 Nov 28
1
Order observations in a dataframe
Dear All, Suppose I have the following dataframe: country;weight;group bul;10;1 cze;12;1 grc;12;1 hun;12;1 prt;12;1 rom14;1 fra;29;2 ita;29;2 gbr;29;2 aut;10;3 bel;12;3 The "group" variable denotes the id-number of a group of countries. How can I re-label the groups in the descending order of their cumulative "weight", which wound be: country;weight;group fra;29;1 ita;29;1
2010 Feb 15
1
dovecot-sieve vacation vs qmail-ldap
Helloo, We are using dovectot lda with qmail-ldap, dovecot 1.2.10, sieve 0.1.15 lda is executed as exec /var/qmail/bin/preline -f /usr/local/dovecot/libexec/dovecot/deliver -s preline adds Delivered-To: header, everything works fine except vacation Feb 9 16:07:16 thebe dovecot: deliver(lazy): sieve: msgid=unspecified: discarding vacation response for message implicitly delivered to <lazy
2006 May 10
8
E-mail validtor??
Does anyone have a good working e-mail validator? or even some regexp to make the validates_format_of work right... that would be awesome. Also, maybe an online tutorial for regexp. i''ve always been afraid of it but i think it''s time to face the fears. thanks! -- Posted via http://www.ruby-forum.com/.
2006 Mar 23
3
How to redisplay submitted data on validation error?
Hi! If i have an object it''s easy. But i''m making a simple contact form and i check if email address is correct. If it''s not i redisplay the form with the info that there was an error (should i use redirect_to or render :action? what''s the difference?), but all previously submitted data is lost. I tried creating variables using names of the form fields, but
2006 Mar 17
6
Problem with ruby 1.8.4 One-Click Ruby Installer on windows
Hi! Previously i had ruby 1.8.2 (One-Click Ruby Installer) installed, but the rdoc and plugindoc didn''t work, so i decided to install ruby 1.8.4. I had uninstalled ruby 1.8.2 (uninstaller deleted the whole ruby folder with radrails and everything, just great) and installed One-Click Ruby Installer 1.8.4-16 preview3. Then installed rails, rmagick, radrails, created docs for trunk
2012 Jan 13
2
Rozważania odnośnie storage?
Cze??. Aktualnie mam do czynienia z klastrem pocztowym, w kt?rym pliki wiadomo?ci pocztowych u?ytkownik?w s? przechowywane na raid software-owym udost?pnianym po NFS. Serwer?w NFS jest kilka, ka?dy udost?pnia podzbi?r wiadomo?ci dla odpowiedniego serwera z postfix-em, kt?ry jest klientem NFS. Dane z jakiego serwera NFS host frontend z postfix-em powinien montowa? katalogi z poczt? s? w MySQL.
2006 Mar 24
7
Question about flash
Hi! I''ve got a search form, which calls search action. If the result set is empty, i set flash to display a proper message. At the end search action calls "render :action => list". If the search action returns empty result set and the message is displayed, but later user changes searching conditions, calls search again and result set is no longer empty, the message is