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
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
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
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
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
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',
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
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
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
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
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
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
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
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',
%= 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
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
16 matches
Mail list logo