[Rails] Re: any help with captcha in my comments ?

2009-08-17 Thread Philip Gavrilos
def create if simple_captcha_valid? @post = Post.find(params[:post_id]) @comment = @post.comments.create!(params[:comment]) else flash[:notice] = please right down the image verification end respond_to do |format| format.html { @post.valid? ? redirect_to

[Rails] Re: querying multiple rows from db in my simple search

2009-08-16 Thread Philip Gavrilos
the AND was outside the single-quotes and thought you were ANDing two strings. On Aug 15, 6:22�pm, Philip Gavrilos rails-mailing-l...@andreas-s.net thats work for me! thanks -philip.g -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message

[Rails] how to include a gem if server dont suport it!

2009-08-16 Thread Philip Gavrilos
how i can include a gem in my application if my hosting server didnt allow me to install it ? like imagemagick or will_paginate for example. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to

[Rails] any help with captcha in my comments ?

2009-08-16 Thread Philip Gavrilos
this is my error: Processing ApplicationController#create (for 127.0.0.1 at 2009-08-17 00:57:56) [POST] Parameters: {comment={name=asdasd, body=asdasd}, commit=Add Comment, post_id=19, authenticity_token=B5dll5fTaDO+ZrEs1S0KkYsmK8VMzCOeDEf731w21zY=, captcha=asdasd, _=} SyntaxError

[Rails] Re: any help with captcha in my comments ?

2009-08-16 Thread Philip Gavrilos
Steve Ross wrote: On Aug 16, 2009, at 3:01 PM, Philip Gavrilos wrote: SyntaxError include SimpleCaptcha::ControllerHelpers def create if simple_captcha_valid? @post = Post.find(params[:post_id]) @comment = @post.comments.create!(params[:comment]) respond_to do |format

[Rails] will_paginate limit my RSS feeds too.. Any help ?

2009-08-15 Thread Philip Gavrilos
hi i use will_paginate for pagination in my blog. i set itto limit 3 posts per page but also limit my RSS feeds :/ any suggestion ? this is my code: controllers/posts.controller.rb def index @posts = Post.all @posts = Post.paginate :page = params[:page], :order = 'created_at DESC',

[Rails] Re: will_paginate limit my RSS feeds too.. Any help ?

2009-08-15 Thread Philip Gavrilos
that along with your RSS feed. On 15 aug, 12:09, Philip Gavrilos rails-mailing-l...@andreas-s.net thanks a lot my friend! that works for me. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed

[Rails] querying multiple rows from db in my simple search

2009-08-15 Thread Philip Gavrilos
Any suggestion why im getting this message in my Simple Search ? ** i want to search in multiple rows in my db. thanks SyntaxError in PostsController#index /Users/webstic/Sites/weblog/app/models/post.rb:7: syntax error, unexpected tCONSTANT, expecting ']' ...onditions = ['body LIKE?' AND

[Rails] different titles

2009-08-12 Thread Philip Gavrilos
hi! I want to have different titles in my weblog. in my app/views/layout/post.html.erb i have this in head: title%= controller.action_name % :: webstic blog :)/title thats fine if im in page that listing my blog articles! but if i chooce to view a page i want the title.post in my title

[Rails] Re: different titles

2009-08-12 Thread Philip Gavrilos
Philip Gavrilos wrote: hi! I want to have different titles in my weblog. in my app/views/layout/post.html.erb i have this in head: title%= controller.action_name % :: webstic blog :)/title thats fine if im in page that listing my blog articles! but if i chooce to view a page i

[Rails] Re: HOW TO SPECIFY CSS

2009-08-11 Thread Philip Gavrilos
Marnen Laibow-Koser wrote: Philip Gavrilos wrote: John Yerhot wrote: %= post.body, :class= body_text % On Aug 10, 11:40�am, Philip Gavrilos rails-mailing-l...@andreas- I have been tried this but dint work :/ error: SyntaxError in Posts#show Remove the comma. Best, -- Marnen

[Rails] Re: HOW TO SPECIFY CSS

2009-08-10 Thread Philip Gavrilos
Ahad Amdani wrote: Newb Newb wrote: Hi... i used paulca-phone_codes plugin for country code.and it works. %= f.select :country_code, PhoneCode.options_for_select(:prefix)% what i want to know is how to apply css class for this.when i tried like below it doesnot work %= f.select

[Rails] Re: HOW TO SPECIFY CSS

2009-08-10 Thread Philip Gavrilos
John Yerhot wrote: %= post.body, :class= body_text % On Aug 10, 11:40�am, Philip Gavrilos rails-mailing-l...@andreas- I have been tried this but dint work :/ error: SyntaxError in Posts#show compile error /Users/webstic/Sites/weblog2/app/views/posts/_post.html.erb:6: syntax error

[Rails] why partial doesn't work ?

2009-08-08 Thread Philip Gavrilos
im getting: undefined local variable or method `post' for #ActionView::Base:0x2673624 where in my code i have the mistake ? please help.. code at index.html.erb br/ h1welcome to my weblog!/h1br/ %= render :partial = posts/preview, :collection = @posts %br / %= link_to 'New post',

[Rails] Re: why partial doesn't work ?

2009-08-08 Thread Philip Gavrilos
%= link_to_unless_current h(post.title), post %/h2 %= truncate(post.body, :length = 300) % br /br / % end % % end % Hope this helps! Jaap Haagmans w. http://www.relywebsolutions.nl On 9 aug, 00:12, Philip Gavrilos rails-mailing-l...@andreas-s.net THANK YOU! THANK YOU! THANK YOU

[Rails] Re: why partial doesn't work ?

2009-08-08 Thread Philip Gavrilos
jhaagmans wrote: i did not understand my error here its because im newbie in ruby ( :P ) (if _preview was _post everything was fine.. i think that is because naming conventions right?) I'm not sure why that works. I would have to look into the code. I recommend you start your reading up