similar to: Can duplicate "back" browser function in Rails?

Displaying 20 results from an estimated 60000 matches similar to: "Can duplicate "back" browser function in Rails?"

2009 Aug 18
5
Increment counter on download
i am offering my site visitors a download of zip file. when someone downloads it, i want to increment a counter and update db. how do i do that? -- Posted via http://www.ruby-forum.com/.
2010 Aug 16
8
Executing js.erb file with :format =>'js'
Hi, I''m trying to get my javascript to execute after clicking a link on my page using :format => "js" here''s my link: <%= link_to image_tag("/images/icons/user_add.png"), add_contact_path(:profile_id => profile.id, :url => request.url, :format => "js"), :title => "Add person to your contacts"%> in my controller i have
2009 Apr 03
7
RJS not rendering correctly when mime-type is 'iphone'
I have an iPhone version of my site, and for some reason none of the rjs works when viewing the iPhone version. This happens instead: ActionView::MissingTemplate (Missing template controller_name/ update.erb in view path app/views) The rjs works fine when viewing the site normally, and it worked when viewing the iPhone version prior to upgrading Rails to 2.3.2. Additional info: I have
2009 Apr 14
6
About haml and ruby on rail
hi all, I am converting my view into HAML format i have done it with "Html2Haml" command, then I removed all the "- end" from haml code and my indentation is also correct,but now it shows following errors I have kept code of show.html.erb and show.html.haml in attachment. please help me I am not getting what exactly the error is? compile error
2009 May 07
12
is there simpler way to export html within xml
Hi, we''re exporting a lot of html code within xml, our current method works but it''s very messy - far from perfect, is there a better way to do this. an example of our controller code is html = html + "&lt;img src=&quot;/icon/icon_email.gif&quot;
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
2010 Dec 21
8
Rails - escape_javascript without all the \n\n\n\n\n
Hello, I''m using escape_javascript to return a partial to the browser via ajax. Something like: $("#inject").html("<%=escape_javascript(render :partial =>"feed/ index")%>"); Problem is escape_javascript ends up outputing all kinds of wasted space like \n\n\n\n\n \n Is there anyway in Rails to escape_javascript more
2009 May 05
4
modalbox rails var interpolation
Howdy everyone. I am using modalbox which is very nice an easy to use. I have this for an edit for a company listing: <td><%= link_to(''Manage Companies'', {}, :onclick => ''Modalbox.show(\''/ companies/edit/#{company.id}\'', {width: 600}); return false;'') %></td> The link is not putting the company.id in it puts #{
2010 Jul 20
20
render :js => "alert('Test !')"
Hi Folks, I use render :js => "alert(''Test !'')" in my modele, but instead of having the alert displayed, the browser try to donload a file containing this string : <<render :js => "alert(''Test !'')">>. Do you know why I the browser behaves such a way ? Regards -- Posted via http://www.ruby-forum.com/. -- You received
2009 Dec 23
8
Where did this value in a form come from?
Newb here. I have a form and a value that is being displayed ... and I have no idea where the value came from. I have done a <%= debugger; '''' %> in the form and, indeed, the debugger stops at the statement. I have tried to trace through the code to see where the value came from ... and I gave up. So ... what in Rails initializes the fields of a form? -- Posted via
2006 Jun 20
4
Invoking MouseOver using link_to tag ?
Hi, How can we trigger a JavaScript built in function from a <%= link_to %> ie. i have the below statement in my view. I want to invoke a JavaScript function on "MouseOver" of this below text (''TestingMouseOverEvents''). <%= link_to "TestingMouseOverEvents" , :controller => "login", :action => "logout"%> Note: The
2010 Dec 06
8
How to add facebook javascript sdk to rails app
Hey, i''m trying to add the facebook javascript SDK to my rails app. How do i do that in the application.html.erb file? -- Posted via http://www.ruby-forum.com/. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To
2009 Sep 02
8
select_month helper
I''m trying to rewrite a fusebox-like application (Active4D plugin to 4D database) in RoR/postgres and I''m doing okay - but keep running into things that stump me. It seems like it takes me hours to figure out something that I could have written in pure code in minutes. The select_month and select_day helper has been my latest waste of time. All I''m trying to do is add
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
2009 Aug 13
10
default value if textfield is empty
Hey all, im not sure where to set a default value if a textfield is empty? For now i do it in the controller, and check if the submitted parameter is blank. But this seems not to be the best solution... Thanks for your help! -- Posted via http://www.ruby-forum.com/.
2010 Nov 16
15
acts_as_taggable, undefined method 'empty?'
I''ve tried out ''acts_as_taggable'', ''acts_as_taggable_on'' and ''acts_as_taggable_on_steroids'' and all of them output "undefined method ''empty?''" with the tag_cloud action. I am following the guides precisely. Yet I can find no references to this error anywhere, so I must be doing something wrong... I am on
2010 Feb 09
3
acts_as_tree question
Hi, I''m trying to implement a very simple acts_as_tree search in my index html. I am able to show the parents, with no issue, but the children will not show. I have something like this for the parent, which displays fine: <% for group in Group.roots %> <td> <tr> <a href="#" onclick="Effect.BlindDown(''show_<%=
2009 Feb 12
4
Easy RoR <-> Javascript syntax question
Hi there, a simple n00b question: I have that Javascript snippet on my page (see below; taken from jquery, actually). I want to pass it the "@cities" array from the controller. But what''s the correct syntax, here? See the 3rd line: ======================================== <script> $(document).ready(function(){ var data = @cities; <---- that''s
2009 Sep 01
9
Ruby on Rails Project Opportunities
Hi I am currently recruiting for a number of freelance contracts and permanent internal positions, both junior and senior, for Europe''s largest and most dynamic Ruby on Rails development projects, offering the chance to work alongside some of the industry''s leading figures in the Web 2.0 development community. Selected locations include Germany (eg Berlin, Munich, Hamburg,
2010 Jan 15
21
Dynamic Assets - can it be done?
I''m looking for 3 areas to work as dynamic assets: image_path, javascript_path, and stylesheet_path When I say dynamic, I mean that they will be dynamic through controller/models. I have been working through approx. 12 hours of searches to satisfy my answer to this question but am not finding much luck. The closest things I''ve found enabling this are use of config for assets