A
anansi
Hi,
when I created a scaffold for the input of some data ,the following was
created as new.rhtml:
<h1>New entry</h1>
<% form_tag :action => 'create' do %>
<%= render
artial => 'form' %>
<%= submit_tag "Create" %>
<% end %>
<%= link_to 'Back', :action => 'list' %>
this is the view which shows the following:
http://img115.imageshack.us/img115/9167/neentryco1.jpg
this is my class Entry:
class Entry < ActiveRecord::Base
def self.show_items
find
all,
:conditions => "date_available <= now()",
rder => "date_available desc")
end
validates_presence_of :headline,:news
validates_uniqueness_of :headline, :news
end
and this are the important lines from the corresponding controller:
def new
@entry = Entry.new
end
def create
@entry = Entry.new(params[:entry])
if @entry.save
flash[:notice] = 'Entry was successfully created.'
redirect_to :action => 'list'
else
render :action => 'new'
end
end
where do I have to make the changes for the display. I want to give the
"News" field you can see on the screenshot more width but dunno how to do.
--
greets
(
)
(
/\ .-"""-. /\
//\\/ ,,, \//\\
|/\| ,;;;;;, |/\|
//\\\;-"""-;///\\
// \/ . \/ \\
(| ,-_| \ | / |_-, |)
//`__\.-.-./__`\\
// /.-(() ())-.\ \\
(\ |) '---' (| /)
` (| |) `
jgs \) (/
one must still have chaos in oneself to be able to give birth to a
dancing star
when I created a scaffold for the input of some data ,the following was
created as new.rhtml:
<h1>New entry</h1>
<% form_tag :action => 'create' do %>
<%= render
<%= submit_tag "Create" %>
<% end %>
<%= link_to 'Back', :action => 'list' %>
this is the view which shows the following:
http://img115.imageshack.us/img115/9167/neentryco1.jpg
this is my class Entry:
class Entry < ActiveRecord::Base
def self.show_items
find
:conditions => "date_available <= now()",
end
validates_presence_of :headline,:news
validates_uniqueness_of :headline, :news
end
and this are the important lines from the corresponding controller:
def new
@entry = Entry.new
end
def create
@entry = Entry.new(params[:entry])
if @entry.save
flash[:notice] = 'Entry was successfully created.'
redirect_to :action => 'list'
else
render :action => 'new'
end
end
where do I have to make the changes for the display. I want to give the
"News" field you can see on the screenshot more width but dunno how to do.
--
greets
(
)
(
/\ .-"""-. /\
//\\/ ,,, \//\\
|/\| ,;;;;;, |/\|
//\\\;-"""-;///\\
// \/ . \/ \\
(| ,-_| \ | / |_-, |)
//`__\.-.-./__`\\
// /.-(() ())-.\ \\
(\ |) '---' (| /)
` (| |) `
jgs \) (/
one must still have chaos in oneself to be able to give birth to a
dancing star