Project

General

Profile

« Previous | Next » 

Revision 0c21f5b3

Added by Ohad Levy almost 12 years ago

  • ID 0c21f5b33728a9ebf7bc99e5c8c261e9126e6bc6

fixes 1692 - bookmark edit dialog, did not allow to save / update bookmark name

View differences:

app/controllers/bookmarks_controller.rb
end
def new
@bookmark = Bookmark.new
@bookmark = Bookmark.new
@bookmark.name = params[:query].to_s.strip.split(/\s| = |!|~|>|</)[0]
@bookmark.controller = params[:kontroller]
respond_to do |format|
format.html
app/views/bookmarks/_form.html.erb
<%= form_for @bookmark do |f| %>
<%= base_errors_for @bookmark %>
<%= text_f f, :name, :value => params[:query].to_s.strip.split(/\s|=|!|~|>|</)[0] %>
<%= text_f f, :name %>
<%= textarea_f f, :query, :value => params[:query], :class => "input-xlarge" , :rows=> '3' %>
<%= checkbox_f(f, :public, :checked => true) %>
<%= f.hidden_field :controller, :value => params[:kontroller] %>
<%= f.hidden_field :controller %>
<%= submit_or_cancel f %>
<% end %>

Also available in: Unified diff