On Wed, Nov 3, 2010 at 6:13 AM, h0bit <[email protected]> wrote:
> Hello everybody,
>
> I have a problem with a submit_tag, because it doesn't work.
>
> Here is the form which i want to submit.
>
> <% form_for :responsible, :url =>
> responsibles_profiles_path(@responsible), :html => {:method
> => :put, :multipart=>true} do |f| -%>
> <fieldset>
> <div class="fields">
> <fieldset >
> <legend><%=
> I18n.t("tog_social.profiles.model.responsible_with_index") %></legend>
> <p>
> <label for="responsible_name"><%=
> I18n.t("tog_social.profiles.model.responsible_name") %></label>
> <%= f.text_field :responsible_name,
> :class=>"fieldbox wide" %>
> </p>
> <p>
> <label for="responsible_email"><%=
> I18n.t("tog_social.profiles.model.responsible_email") %></label>
> <%= f.text_field :responsible_email,
> :class=>"fieldbox wide" %>
> </p>
> <p>
> <label for="responsible_tlf"><%=
> I18n.t("tog_social.profiles.model.responsible_tlf") %></label>
> <%= f.text_field :responsible_tlf,
> :class=>"fieldbox wide" %>
> </p>
> </fieldset>
> </div>
> </fieldset>
> <br />
>
> <!--Añadimos el botón actualizar responsable-->
> <div class="actions">
> <%= submit_tag
> I18n.t('tog_social.profiles.member.update_responsible'), {:accesskey
> => "s", :class=>"button mainaction"} %>
> </div>
>
> <% end -%>
>
> And this submit doesn't work.
>
What do you mean "doesn't work"? When you press, does the browser try to
navagate? Do you see any output from the rails server console? Error
messages?
>
> In the controller i have the next code to update the responsible.
>
> def update_responsible
> responsible = Responsible.find(params[:responsible])
> responsible.update_attributes!(params[:responsible])
> responsible.save
> flash[:ok] = I18n.t("tog_social.profiles.member.updated")
> redirect_to profile_path(profile)
> end
>
> And i want to know how can i resolve this problem?
>
> thanks for your help.
>
> --
> 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]<rubyonrails-talk%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
--
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.