I have a store application and want my store items to display in a 3 column catalog. I want the 4th item to move to a new row automatically after the 3rd item is placed on the 3rd column on the first row. All items will be called from the database.
How can I acheive displaying my product catalog like thumbnails. At the moment this is wh...
I'm using jquery Ui autocomplete, with this highlight function http://stackoverflow.com/questions/3053286/how-highlight-words-jquery-ui-autocomplete
My problem is that it works. But in the drop-down list the strong tag is not rendered as html but as text.
For example when i type Wild
I end up with something like this Oscar <strong>Wild<...
Suppose we have a textarea in which we put example string. Textbox contain :
Earth is revolving around the Sun.
But at the time of saving, I just pressed a enter key after "the sun". Now the statements in texbox ::
Earth is revolving around
the Sun
Now, in database where enter was pressed the \r is stored. Now i am trying to fetch...
I have created the step:
Given /^the feed "([^"]*)" has an item "([^"]*)" published at "([^"]*)"$/ do |feed_name, feed_item_title, published_at|
feed = Feed.find_by_name(feed_name)
FeedItem.make(:feed => feed, :title => feed_item_title, :published_at => published_at)
end
And I run the cucumber test with:
Scenario: feed items ...
I think there is a wide consent that is a good practice to separate your REST API from your main website. The main reason is that you can scale your API and website independently of each other.
Additionally, Rails has a lot of middleware that is not required for stateless services (e.g. sessions, cookies, view rendering, etc...). Jeff D...
I am trying to use this forked version of the searchlogic gem. In my gemfile, I have
gem "searchlogic", :git => "http://github.com/railsdog/searchlogic.git"
when I do bundle install, I get this error:
Could not find gem 'searchlogic (>= 0, runtime)' in http://github.com/railsdog/searchlogic.git (at master).
Source does not contain an...
I want to loop through all the properties of my 'user' model, how can I do this?
...
Hello,
I am currently setting up Paperclip for a model with Rails 3. When one of the fields fails validation (title), the user has to upload the file again. This is not very user friendly :/
The recommendation from the Paperclip forum is to move the Paperclip stuff into a related model. My model is very simple with just a few fields, ...
I'm facing a problem I don't really understand.
This is my controller
def index
@resources = Resource.all(:limit => 10)
respond_to do |format|
format.html # index.html.erb
format.xml { render :xml => @resources }
end
end
When i try to access the html page, everything works fine, but when i hit the .xml ...
Hi,
I'm fairly new to Rails and am writing a login form. I have used form_tag to pass through the user's submission to the account controller. Now, I don't want the user to be able to enter their login details through a GET request, so how can I check that a certain param is either a GET or POST parameter?
Thanks in advance
...
Hi there,
I have a paginated list, and a select box of numbers showing how many pages to display. When the user picks a value I want the screen to refresh with the resized list.
View:
<%= select_tag :paginate_size, options_for_select([['Display: 5', 5],['Display: 10',10],['Display: 20', 20],['Display: 30', 30],['Display: 50', 50],['...
We're developing a plugin for rails, and I've got Cucumber working with Capybara wonderfully. BUT, when developing, I've been (erroneously, I guess) putting the Javascript files in the parent test application's public/javascript directory. So when Capybara runs, it doesn't find the javascript file. How can we get Cucumber/Capybara to see...
I'm using acts_as_taggable_on to add tags to posts, other tagging plugins/gems don't work with rails 3. I can edit/display tags on the post model and the tags controller displays the posts tagged by name i.e /tags/post-tag-name/.
The functionality I want is to turn the tags on the posts pages into links to display the other posts with th...
Hi all,
I have an FTP server which is running FTPS (TLS/SSL) I need to be able to connect to this using a ruby on rails app.
Does anybody know of a method to do this. I have tried the Net:FTP libary but this doesn't appear to support explicit FTPS connections.
Thanks
Craig
...
I have a button on my Ruby on Rails view file.
Firstly when the button is clicked an ajax call is made which in response gives a json string. So far I have accomplished this task. I am stuck here:
The button also redirects me to another action of the same controller. Now I want to send the json string received by javascript as a parame...
I have a "user" model that "has_one" "membership" (active at a time). For auditing and data integrity reasons, I'd like it so that if the membership changes for a user, the old/current record (if existing) has an inactive/active flag swapped, and a new row is added for the new changed record. If there are no changes to the membership, I'...
for this command i got this error "sudo gem install sqlite3-ruby"
Building native extensions. This could take a while...
ERROR: Error installing sqlite3-ruby:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /Syste...
This is a new application, and I have an index method on a Search controller. This also serves as the home page for the application, and I'm trying to decide if I am headed down the wrong path from a design pattern perspective.
The method is already 35 lines long. Here is what the method does:
3 lines of setting variables to determine...
Hi All
I have a rails application deployed to jboss as a war packaged using warbler. The application has been working great for a while now.
I am looking to change the rails application so that rails, all gems and their dependencies are vendor'd. To that extent I have it working great and can boot the application locally using mongrel...
Hi,
Many programmers use devise as their authentication solution and I would like to get their advice:
Devise is already tested, but I want to know if there is something to test by myself (integration/unit/funtionnal tests?) for a standard devise integration with my knowledge
(I'm not familiar with shoulda and cucumber, but I know a ...