Displaying 5 results from an estimated 5 matches for "blog_entry".
Did you mean:
mlog_entry
2009 Feb 22
8
dynamically changing a form from POST/CREATE to PUT/UPDATE
...but my update method will always respond with format.html, not
format.js, which is meaning I''m getting forwarded to my default
scaffold "show" page, which greets me with a nice "Your blog entry was
successfully updated."
My update method looks like:
def update
@blog_entry = @user.blog_entries.find(params[:id])
respond_to do |format|
if @blog_entry.update_attributes(params[:blog_entry])
flash[:notice] = ''Blog entry was successfully updated.''
format.js { redirect_to(:action => ''success'') } if
request.xh...
2009 May 05
1
will_paginate problem
Hi all,
I''m having a bit of a problem with displaying a blog list using the
will_paginate helper. My code is:
entries_controller:
def index
@entries = Entry.find(:all)
@blog_entries = @entries.paginate( :page => params[:page], :per_page =>
4,
:include => :user,
:order =>
2006 Feb 03
0
newbie trouble with find method and dual many-to-many relationship
Hi,
I''m trying to do something which I think is fairly simple, but I''m stuck on the
syntax. Briefly, I have three classes: users, groups, and blog_entries.
There''s a M2M relationship between users and groups, and a M2M relationship
between groups and blog_entries.
I''ve got my classes defined ok, but in my "list" method for the blog_entries I
2006 Aug 16
1
Creating a comments system for multiple types of content
...ting system that in fact is quite simple,
but I wanna use it for all these 3 types of content.
My question: how can I do that? I maybe could add an association to all
three types in the comment model:
class Comment < ActiveRecord::Base
belongs_to :news_item
belongs_to :party
belongs_to :blog_entry
end
And in all the three models I then added a "has_many :comments"
statement. This would work, but every comment entry would belong only to
one of the three models, so there were many NULL values that seem
incorrect to me.
And when another content type would be created (like party_re...
2008 Sep 13
3
Freebsd auto locking users
Dear FreeBsd gurus, I have a problem concerning users password and
authentication policies. The goal is
1)make freebsd to lock users after 3 unsuccessful login attempts,
2)force users to change their passwords every 90 days
I've done such changes in Linux distros, with various PAM modules.But in
Freebsd it seems that i need to use login.conf file. Here I made
necessary changes in that