How to install Ruby on Rails alongside WampServer ?
Is is possible to install Ruby on Rails alongside WampServer (and keep WampServer's Apache/MySQL installs)? ...
Is is possible to install Ruby on Rails alongside WampServer (and keep WampServer's Apache/MySQL installs)? ...
Can someone tell me why this is executing the POST method instead of my PUT method that I specify on the ajax request. <% form_remote_tag( :url => contact_url(detail), :method => :put, :complete => "Element.toggle($('#{form_id}))", :success => visual_effect(:shake, "contact-#{detail.id}"), :update => "contact-#{detai...
I was trying to limit the instantiation of a class to just a single one(without using singleton) but i couldn't. I tried with class variables (@@) but without luck. I googled it and came across this: class A @count = 0 class << self attr_accessor :count end def initialize val @a = val self.class.count += 1 ...
I'm planning to make the database of a Rails project available for download publicly. This database contains an Authlogic users table, with crypted_password and password_salt fields. How securely are these passwords stored... is it safe to make them available publicly this way? Or should I look at implementing another authentication syst...
For example, I have Update action in Product Controller. I want to measure how much memory consumption when the Update action being invoked. thanks. ...
Hello! On my site, the user can watch his profile. In his profile he can have a look at his data (i.e. signature). Now I want my users being able to edit this data while watching it. So I coded the following in my view: <div id="profile-signature"> <p> <b>Signature:</b> <%=h @user.signature %> </p> <%= form_remote_tag(:up...
Hi everybody, I think this has been asked before but even though I searched Google I haven't come up with a solution. So this is what I'm trying to do in Rails 2.3.5: layouts/application.html.erb: <html> <head> ... some other stuff <%= yield :head %> </head> <body> <% content_for :head, "something that belongs in the...
Let's say I have a listing a listing has a date and a featured (of true or false) How do I order my listings to order by featured = true first? Currently I have some listings as featured nil, then a few appeared as false - the ones that appeared as false are showing up before featured true. This makes sense because false is before tru...
The idea would be to replace ERB with templates that are pure XHTML and that the view would be pure code manipulating the template content. Have this been done already ? ...
when I run rails console in netbeans6.8(Ruby on Rails) then getting following error ? 'irb.bat' is not recognized as an internal or external command, operable program or batch file. what I need to do for this ? ...
I have this to calling the choose_category: <% form_remote_tag :url => { :action => :choose_category, :id => category } do %> <%= submit_tag category.name%> <% end %> And I have this method to calling the choose_category.js.rjs: def choose_category begin category = Category.find(params[:id]) rescue ...
I have a app that uses Prawn to do some PDF generating, it works fine and I've had no problems with it. It's now come to the point where I want to test it through Apache using Passenger. This is where the problem appears. I get the passenger error page with this error: no such file to load -- prawn (MissingSourceFile) I restarted scri...
Hi, I'm new at ruby on rails, and I've noticed that when I send an email, my site_name and site_url vars are not being recognized from the mailer files. In my config.yml file I've got the following: development: &local site_name: my site name site_url: http://localhost:8282 company_name: my company name admin_email: a...
I have many products, each product belong to one category. How can I generate each category in hyper text, and when I click on the category hyper text, I can get all the products which is belongs to this category. And ideas on that? ...
Here is the code for generate button, but I want it in a hyper text, how to modify this? <% form_remote_tag (:url => { :action => :choose_category, :id => category }) do %> <%= submit_tag category.name %> <% end %> I tried to use the link_to, but it can't submit a post method, what can I do? ...
Hello! At the moment I try to do following: I created several partials (i.e. _show_signature.html.erb) for my user. Now I want to show them on clicking a link. In my user controller, I created a new action: def show_signature @is_on_show_signature = true end def show_information @is_on_show_information = true end ...
I switched from prototype library to jquery with jrails plugin. After that I've got the warning: jrails.rb:17: warning: already initialized constant JAVASCRIPT_DEFAULT_SOURCES jrails.rb looks like: ActionView::Helpers::PrototypeHelper::JQUERY_VAR = 'jQuery' ActionView::Helpers::AssetTagHelper::JAVASCRIPT_DEFAULT_SOURCES = ['jquery.mi...
I'm coming across a problem that I can't find much online for via Google, forums, groups, etc. and so I'm going to raise my hand and ask for help from those who are more wise than I :) I have a rails project setup that was using nested_attributes_for with a one-to-one relationship between two models. It worked quite easily and as expec...
I use Rails 2.3 i18n with a database backend plugin : http://github.com/dylanz/i18n_backend_database This stores my translations and locales in two DB tables. What would be the best way to get these tables working with my tests? I'm guessing I could write a rake task that would copy the tables from the development DB to the test DB. A...
For test purposes I want to change the return value of request.remote_ip. While being on my development machine it returns always 127.0.0.1 as it should but I would like to give myself different fake IPs to test the correct behavior of my app without deploying it to an live server first! Thank you. ...