Thank you!
I am still having the problem that the URI gets too large if I want to
send to much data to the database. How can I avoid this?
Can I maybe call my @fam_pubs variable in the create method of my
watchedfamilies controller, so that it is not needed to send it with
the URI?
If yes how would that look like? My create method is still the
standard one:
def create
@watchedfamily = Watchedfamily.new(params[:watchedfamily])
respond_to do |format|
if @watchedfamily.save
format.html { redirect_to(@watchedfamily, :notice =>
'Watchedfamily was successfully created.') }
format.xml { render :xml => @watchedfamily, :status
=> :created, :location => @watchedfamily }
else
format.html { render :action => "new" }
format.xml { render :xml => @watchedfamily.errors, :status
=> :unprocessable_entity }
end
end
end
Cheers,
Sebastian
On 28 Apr., 11:03, Pale Horse <[email protected]> wrote:
> > Sebastian wrote in post #995486:
>
> > I am not quite sure what you meant with 'calling a Model method
> > directly', probably this one, or?
>
> Watchedfamily is your Model in the example below, 'create!' is the
> method called on it and '(params[:watchedfamily])' is what you are
> passing to that method.
>
> > <% Watchedfamily.create!(params[:watchedfamily]) %>
>
> > So I already changed my code as you can see below. Is that still Code
> > Smell or is that better?
>
> Read this article:http://c2.com/xp/CodeSmell.html
>
> > <%= button_to "SavePatent",
> > :controller => "watchedfamilies",
> > :action => "create",
> > :watchedfamily => {
> > :Prio_No => @Prio,
> > :title => @title.join(","),
> > :watchedmembers_attributes => @fam_pubs
> > }%>
>
> --
> Posted viahttp://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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.