[Rails] Re: How to improve a plugin?

2009-06-16 Thread Vojto
but I want to use the best solution - the most ruby solution. On Jun 16, 2:20 pm, Maurício Linhares wrote: > And what's the error? > > If it's working the other way, just go for it. > > - > Maurício > Linhareshttp://codeshooter.wordpress.com/|http://twitter.c

[Rails] Re: How to improve a plugin?

2009-06-16 Thread Vojto
s.module_eval do >     include MyActMethods > end > > - > Maurício > Linhareshttp://codeshooter.wordpress.com/|http://twitter.com/mauriciojr > > > > On Tue, Jun 16, 2009 at 8:45 AM, Vojto wrote: > > > OK Here's the problem: > > > The original mod

[Rails] Re: How to improve a plugin?

2009-06-16 Thread Vojto
it in separate module. Something like ActMethods.module_eval include MyActMethods doesn't work. On Jun 16, 1:35 pm, Vojto wrote: > Yes I got it. > > But assume we have a Rails project. > > I could group all those methods and save them to lib folder. > > But where should I a

[Rails] Re: How to improve a plugin?

2009-06-16 Thread Vojto
Yes I got it. But assume we have a Rails project. I could group all those methods and save them to lib folder. But where should I add PluginsClass.class_eval line - that one which would trigger this extending. It doesn't work when I put it into lib. On Jun 16, 1:31 pm, Sijo Kg wrote: > Then i

[Rails] Re: How to improve a plugin?

2009-06-16 Thread Vojto
OK this is cool. Now where should I put this code? On Jun 16, 1:14 pm, Sijo Kg wrote: > For example if you have the class MyClass in the existing plugin and if > you extend and create another plugin Then in the main library file you > can do like > > MyClass.class_eval do > >   def first_def >

[Rails] Re: How to improve a plugin?

2009-06-16 Thread Vojto
Yes, that's what I want to do. Extend it without modifying. How do I do that? On Jun 16, 12:57 pm, Sijo Kg wrote: > What about  extending the existing plugin without modifying ? > -- > Posted viahttp://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this m

[Rails] How to improve a plugin?

2009-06-16 Thread Vojto
Hello, I want to add some functionality to a plugin. The original plugin extends ActiveRecord by including 'ActMethods' .. I'd like to add some methods to this 'ActMethods' module. I tried just redefining ActMethods, but then original methods didn't work. - - - So what's the best way to impro

[Rails] Re: Rails I18n

2009-06-13 Thread Vojto
You say it's first set from params[:locale] So all you need to do is open page with ?locale=xx On Jun 14, 3:49 am, Youyou Semsem wrote: > Hi, > I am trying to use i18n in rails. I want the language to be set first > from params[:locale] (probably already in the url) then from the browser > http

[Rails] Re: How does controller call render when there's no render in action

2009-06-07 Thread Vojto
Sweet, so I totally missed perform_action method :) Thanks :) On Jun 6, 3:01 pm, Frederick Cheung wrote: > On Jun 6, 12:17 pm, Vojto wrote: > > > I have a question. > > > "send(method, *arguments)" this calls action of a controller, right? > > not quite

[Rails] How does controller call render when there's no render in action

2009-06-06 Thread Vojto
Hello, I was studying Rails source and at this point: def process(request, response, method = :perform_action, *arguments) #:nodoc: response.request = request initialize_template_class(response) assign_shortcuts(request, response) initialize_current_url a

[Rails] Re: How can I upload images to another server by FileColumn?

2009-04-02 Thread Vojto Rinik
y VPS .. - - - Vojto Rinik vo...@rinik.net 0910670899 On 2.4.2009, at 10:27, HeChian wrote: > Hi, > Did you mean sync file to another server? > > On Thu, Apr 2, 2009 at 12:49 PM, Vojto wrote: > > Hello, > > can I upload my file to ftp when using this Paperclip thing? > &

[Rails] Re: How can I upload images to another server by FileColumn?

2009-04-01 Thread Vojto
Hello, can I upload my file to ftp when using this Paperclip thing? On Apr 1, 4:32 pm, gluis wrote: > is there a reason you're using FileColumn, specifically? > > i highly recommend thoughtbot's > Paperclip:http://thoughtbot.com/projects/paperclip > > it's simple, handles permissions/deletions

[Rails] Re: Two models with restful_authentication

2009-03-19 Thread Vojto
Give us the context of where the error is getting raised. On 19. Mar., 08:07 h., Indu RS wrote: > Vojto wrote: > > Try to load up script/console, and check if user.category_ids= > > [1,3,6,...] works .. > > > On 19. Mar., 07:38 h., Indu RS > > Thanks for the

[Rails] Re: Two models with restful_authentication

2009-03-18 Thread Vojto
Try to load up script/console, and check if user.category_ids= [1,3,6,...] works .. On 19. Mar., 07:38 h., Indu RS wrote: > Hai everyone, > I am using restful_authentication plugin in my project. The relation > between the category and user is has_and_belongs_to_many. So I created > another tabl