Displaying 20 results from an estimated 4000 matches similar to: "Rails 3 - Loading a Subnav with Ajax… Which controller owns a subnav?"
2006 Mar 15
4
sub-selection with $
Hello,
I have 2 navigations ( mainnav and subnav ) with 2 lists
List have same names ( li0 li1 li2 )
What is the best way to select li1 of subnav with prototype 1.4 in this
case ? I just want to hide/show it
Thanks
<div id="mainnav">
<ul>
<li name="li0"><li name="li1"><li name="li2">
</ul>
</div>
<div
2008 Aug 08
2
template.expect_render fails when partial is rendered from a helper
My spec;
describe ''subnav rendering while logged in'' do
before do
template.stub!(:logged_in?).and_return(true)
template.stub!
(:current_profile).at_least(:once).and_return(mock_profile)
end
def do_render
render "/homepages/show.html.erb"
end
it "should render the logged in partial for homepages" do
2010 Sep 21
25
Working in install acts_as_commentable, On create, error: "unknown attribute: book_id"
Hello, I''m working to install the acts_as_commentable plugin on my
Rails 3 app.
After adding "acts_as_commentable" to my book model, I then added a
comment form on my book show view:
<% form_for(@comment) do|f| %>
<%= f.hidden_field :book_id %>
<%= f.label :comment %><br />
<%= f.text_area :comment %>
<%= f.submit "Post
2010 Sep 12
11
Rails Commenting, Plugins?
Hello,
I''m looking to add comments to records in my app like Books. So a user
can view a Book and then comment on it...
As a newbie, is this something that I should build from scratch, or
are there any popular Commenting Plug-ins, (Ajax implemented) that
might be worth utilizing?
Thanks
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2010 Sep 23
8
HowTo; Rails 3, having Tabs that load content via jQuery ... No Page Refesh
Hello, I''m interested in learning the correct/smart approach for
implementing a web page with tabs and a content panel... When the tab
is clicked by the user the tab''s content is fetched and inserted with
jQuery... no page refresh...
Example, Facebook, when you click Photos or Events, it doesn''t refresh
the browser, just replaces the content with AJAX in the
2008 Jun 12
10
Ajax.Updater not working in IE, tried everything
hi,
i am basically using a button, Prototype/AJAX, and PHP to update a
user''s location. something simple as typing ''Chicago, IL''. After the
script, it rewrites the result in a div tag.
here is the form i''m using:
<div id="hometown_result">Aurora, IL</div>
<form action="" method="post"
2010 Sep 18
11
Commenting in an ERB without generating a compiling error
Hello,
I have the following:
<% @projects.each do |project| %>
<tr>
.
<td><%= link_to ''Destroy'', project, :confirm => ''Are you
sure?'', :method => :delete %></td>
.
</tr>
<% end %>
How can I safely comment out the TD line above? Do I have to use the
=begin way?
--
You received this message because you
2010 Sep 27
9
Rails 3 - Creating a comment and then returning the Partial with JUST the new comment
Here''s the flow I have...
First, jquery posts the new comment to the server:
$.post(this.action,$(this).serialize(),null,''script'');
Then in the comments controller:
def create
@comment = lots of stuff going on here but it works...
if @comment.save
flash[:notice] = "Successfully created comment."
2011 Mar 08
2
Rails - Acts as Nested - Impossible move, target node cannot be inside moved tree.
Hello, I''m using the Awesome Nested Set plugin:
https://github.com/collectiveidea/awesome_nested_set
And in my model I do the following:
acts_as_nested_set
after_save :ensure_max_nestedset_level
private
def ensure_max_nestedset_level
if self.level > 2
self.move_to_child_of(parent.parent)
end
end
I do this to keep the levels from getting
2005 Dec 30
11
Losing my mind with Ajax link_to_remote
I''m playing around with Rails, and I can''t get this to work. I just
can''t seem to wrap my brain around it. I''m having some trouble doing an
Ajax navigation column. Here''s what I have:
view layout:
<div id="navigation">
<%= render(:partial => "navigation", :collection => @categories) %>
</div>
My
2007 Jun 19
4
back button for AJAX in rails
Greetings all,
I am wondering are there any thing like link_to_remote(:update, :url) in
rails which preserves the navigation feature (back & forward button as
well as bookmarks) of the browser? Thanks very much!
Cheers,
Difei
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
2010 Dec 01
10
How to Redirect from http://mysite.com to https://www.mysite.com on Herok
Hello I''m looking to learn how to redirect all non-www (mysite.com) to
https://www.mysite.com
I tried the following:
class ApplicationController < ActionController::Base
before_filter :check_uri
def check_uri
redirect_to request.protocol + "www." + request.host_with_port +
request.request_uri if !/^www/.match(request.host) if Rails.env ==
2010 Sep 03
1
Action Controller Error: undefined local variable or method `current_user'
Newbie learning Rails. I''m currently on Chp9 here:
http://railstutorial.org/chapters/sign-in-sign-out#top
At the end of the tutorial, rails is erroring (see below). being new
to Rails and after having checked the tutorial... How do you resolve
this kind of error. It''s saying current_user is not defined, and it is
supposed to be defined with/Sites/sample_app/app/helpers/
2011 Nov 15
3
create e menu for navigation.
Do you know if there is a gem for creating menu navigations?
I''ve tried simple_navigation but it''s too simple.
I like menu navigation of active_admin gem but I don''t know how to create it.
--
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
2006 Jun 22
0
sortable list doesn''t work on production server
I have a sortable list in one of my views, using the sortable example
from the recipes book. The sorting works great on my mac. When I throw
it on the server for testing it doesn''t save the display order.
I cracked open the log file and see that it''s not even returning the
id''s like it should:
Parameters: {"action"=>"sort",
2006 Jun 20
4
AJAX effects make browser jump to top of page
I''ve been having this really annoying issue with any visual effect that
I use in Rails. Say, for instance, that I have an Element.show or
Element.hide link to expose a hidden div. Well, the effects work great,
but if they are located far enough down on the page to necessitate
scrolling, the effect makes the browser jump to the top of the page.
This is basically the source output that
2006 Jun 06
2
Toggle css for display on page load?
In my layout I have a navigation bar with a few elements in it. The
elements can be toggled on or off and thereby reveal or conceal some
subtopics. I store the state of the toggle for the navigation elements
in the session.
When the page is reloaded, the navigation items are collapsed because
the css for display: none is set by default in the html for the
navigation elements. Is there a
2013 Jul 04
1
simple-navigation items from database
Hello, i would like to ask how can i generate menu items from database
using simple-navigation ? i was looking in documentation
https://github.com/andi/simple-navigation/wiki/Dynamic-Navigation-Items
but i dont get it.
i have default config/navigation.rb
SimpleNavigation::Configuration.run do |navigation|
...
end
and i have database
categories
id
category_id
name
how can i generate a
2007 Jul 26
0
Problems with RJS & Ajax
I try to create an "onKeypress" event handler for a form but nothing
works!
I have already studied the reference books on Ajax, but that didn''t
help.
Can someone explain me how todo this?
These are the code-snippets:
1) application.js
var GridControlTracker = {}
GridControlTracker = {
gridEventHandler: function(element, value) {
alert(''Key Pressed / element:
2005 Sep 01
0
Multi-Page Websites VS AJAX
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
I found this to be quite interesting not sure if there are any plans for
implementing it.
The problem
In a regular Multi Page Interface (MPI) website, each page has a unique URL.
These URLs can be used to bookmark your location, and the browsing history
is just a list of those URLs in the order you visit them. An AJAX
application however has a