search for: petan

Displaying 7 results from an estimated 7 matches for "petan".

Did you mean: petar
2009 Jun 05
6
rails 2.3.2
Hi all, I am using rails v.2.3.2 and if I put following line to my ApplicationController: include LoginSystem and I moved my login_system.rb to lib folder: module LoginSystem protected def is_logged_in? @logged_in_user = User.find(session[:user]) if session[:user] end def logged_in_user return @logged_in_user if is_logged_in? end def logged_in_user=(user) if
2009 Mar 02
5
new project at the same domain
Hi, just a quick question, is there a way how to run two apps on the same domain? Both for testing purposes. Thank you. P. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2009 May 20
3
ffmpeg + mp3 convert
Hi all, I am using paperclip plugin to upload mp3''s. Before I save the mp3 I would like to convert it to a smaller size. I am using ffmpeg library and in my Track model I am calling: before_save :convert_mp3 def convert_mp3 system("ffmpeg -i #{mp3.to_file.path} -vn -ar 44100 -ac 2 -ab 64 -f mp3 #{mp3.to_file.path}") end But this fails. Am I missing something?
2008 Nov 27
7
will_paginate issue
Hi, I am trying paginate (will_paginate) users posts. It is counting and showing the page links correctly, but still showing all the posts on one page. @entries = @user.entries.paginate :per_page => 5, :page => params[:page], :order => ''created_at DESC'' If I change it to @entries = Entry.paginate :per_page => 5 ........ It is fine, but I would like to show only
2009 Jan 30
2
rescue ActiveRecord::RecordInvalid
Hi all, I am using is_attachment plugin, but I will always end up with this error: RuntimeError in PostsController#create BLAH which was caused by: version.filename = file_name_for_version(version_name) begin version.save! rescue ActiveRecord::RecordInvalid raise "BLAH" end end RecordInvalid was raised by save! because is invalid. Does anyone know why? I am uploading
2008 Nov 30
2
How can I set default value for text_field?
Please this code: <p> <%= f.label :"Host Name" %><br /> <%= f.text_field :HostName %> </p> I want to set a default to this text field, how can I do this? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2008 Dec 05
1
page views counter
Hi all, I''ve made a really simple page views counter. def show @post = Post.find...... addcount = @post.views += 1 @post.update_attribute "views", addcount end Its working fine, but if someone hold the F5 key, it keeps counting and counting. Which is not a really good. Is there a way how to force the counter to not keep counting while someone is holding the F5 key? THX