When I try to add the form element in a partial:
<%= f.hidden_field :profile_id, :value => profile_id %>
I get an error that f is unknown. Is there a way to add form elements
with a partial?
On Mar 18, 4:10 pm, Frederick Cheung
wrote:
> On Mar 18, 10:29 pm, Dave L wrote:> Okay, thats what I
On Mar 18, 10:29 pm, Dave L wrote:
> Okay, thats what I was going to do in the beginning, but the problem
> is how to define the variable for that if else statement. This is for
> a login, so for a certain page I was thinking about inserting a
> partial into the login popup form that would con
Okay, thats what I was going to do in the beginning, but the problem
is how to define the variable for that if else statement. This is for
a login, so for a certain page I was thinking about inserting a
partial into the login popup form that would contain a hidden field of
that id of the user tha
On Mar 18, 8:51 pm, Dave L wrote:
> Yes, that is exactly what I was looking for. I am having some trouble
> calling this custom method within an ajax call though. I am able to
> call page.redirect_to user_path(user) but when I try the following:
>
> respond_to do |format|
> form
Yes, that is exactly what I was looking for. I am having some trouble
calling this custom method within an ajax call though. I am able to
call page.redirect_to user_path(user) but when I try the following:
respond_to do |format|
format.js do
render :update do |page|
Hi,
I think you are looking for something like this:
By using the filters to check if the user is logged in or not and showing
him the login partial. Now in the controller, if the user is successfully
logged in try calling a method similar to the following:
redirect_back_or_default('/')
I would store it in the session.
session[:return_to] = url_for(profile_path(current_profile))
On Mar 16, 12:07 am, David wrote:
> I have a situation where I need my ajaxed login popup to route to a
> different page than the default route. Specifically this situation is
> if they are trying to
7 matches
Mail list logo