Hi,
(perhaps this one is easy, but I''m kind of a newbie ;)):
I want to make an Bookmarklet, with which I can post new Links in my link form:
http://localhost:3000/link/new?link[ur]=http%3A//documentation.rubyonrails.com/&link[title]=Ruby%20on%20Rails&link[text]=sometext
How is this done the best way?
This one works in my controller
if params[:link]
@link = params[:link]
end
means, the link array ist filled correctly, but the values aren''t
displayed in my form. Also
<%= error_messages_for ''link'' %>
throws an error than :(
Thanks for solutions,
Beate
Hi,
(perhaps this one is easy, but I''m kind of a newbie ;)):
I want to make an Bookmarklet, with which I can post new Links in my link form:
http://localhost:3000/link/new?link[ur]=http%3A//documentation.rubyonrails.com/&link[title]=Ruby%20on%20Rails&link[text]=sometext
How is this done the best way?
This one works in my controller
if params[:link]
@link = params[:link]
end
means, the link array ist filled correctly, but the values aren''t
displayed in my form. Also
<%= error_messages_for ''link'' %>
throws an error than :(
Thanks for solutions,
Beate
(sorry if this comes twice, I sent it 22h ago, but it wasn''t displayed
here.)
@link = Link.new(params[:link]) should work, though it won''t save it to the database. You''ll need to call @link.save somewhere, or use Link.create() instead of Link.new(). On 9/14/05, Beate Paland <bpaland-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > (perhaps this one is easy, but I''m kind of a newbie ;)): > > I want to make an Bookmarklet, with which I can post new Links in my link form: > > http://localhost:3000/link/new?link[ur]=http%3A//documentation.rubyonrails.com/&link[title]=Ruby%20on%20Rails&link[text]=sometext > > How is this done the best way? > > This one works in my controller > if params[:link] > @link = params[:link] > end > means, the link array ist filled correctly, but the values aren''t > displayed in my form. Also > <%= error_messages_for ''link'' %> > throws an error than :( >