I may need to explain why I need a app first.
Actually, I need a website which can store massive information and users can search through out the website, the functions I need are : admin should be able to add the articles or information in the app , start develop this app based on a wiki or a cms system, which one is better ?
We hav...
So a user would add a "add bookmart to the website" bookmark on their bookmarks and when they click it, a page would open and it would take the URL of the website that they were on when they clicked the bookmark...
If it matters, i'm trying to build the website on Rails, and i'm in very beginning stages, and i just wanted some ideas on ...
During a post for a new model, I am checking for authentication via Authlogic. There is a before_filter on the create request. It is calling require_user. After the user session has been successfully created, the redirect_back_or_default(default) method is called. The problem is, The request needs to be posted to the stored uri. I ha...
I'm fairly new to Rails and Rack, but this guy had a seemingly straightforward write-up about using Rack to implement dynamic session domain middleware. The code looks good to and I've implemented it here on my local machine, but I'm still not able to transcend top level domains on a single login.
Here's the middleware code:
class SetC...
I want to build a website which can generate a specific employments contracts depends on the users(would be employer or HR manager) inputs and type of the employment.
But now, I found it is damn hard to create pages and pages just because they have the different format, e.g the full-time employment contract will not have the sections on...
I'm running Mac OS X v 10.4.11 and I want to install Xcode to compile and run ruby on rails. When I go to apple site I must download latest version of Xcode which does not run on my version of OS X. Where can I download a version of XCode that i can install in my environment. Can anyone provide me with a link?
...
I've got a table with employees (id, name, role) and a relations table bosses (employee_id, superior_id; both foreign_keys to employees.id to employees).
Now if a employee logs in, I only want to show his/her employees; an admin (role=admin) can see all employees.
For the admin it's easy:
Employee.find(:all) #to list them
Employee.fin...
I am trying to get the root of my application to route to a default controller. From what I read, this should be possible with something like this at the bottom of my routes.rb file:
map.root :controller => 'albums'
or perhaps even:
map.home '', :controller => 'albums'
However, when I try navigating to http://myhost:8000/, I just...
Is it possible to i18n-ize authlogic?
...
I am using RSpec for writing tests.
What do you think, is a good Code to Test Ratio?
...
hi,
i want to use radio buttons for survey.
ex:
Best Article Award
Tamil
Monica
Best Article on Travelogue Award
Tamil
Selvi
...
the answers will be the radio button.. am implementing this as follows
<%=radio_button(count, :voting, :nominees ) %> <%= response.nomination %>
where count is the id of radio button
voting -- model...
<% count = 1 %>
<% for question in @questions %
<%=count%>. <%= question.title if question.title%>
<% for response in @response %>
<% if response.question_id.eql?(question.id) %>
<%=radio_button(count, :voting, :count_modification) %> <%= response.nomination %>
<% end %
<% end %
<% count += 1 %>
<% end %>
Thi...
Hi all
does somebody tested - will authlogic works with oauth-plugin (https://github.com/pelle/oauth-plugin) or not?
...
I'm working on a Rails project that utilizes Action Mailer to send out mail campaigns. For the moment I have been testing everything with a plain old GMail account. Getting closer to release now and I've decided to switch the smtp server to our local mail server.
This is all well and dandy until we attempt to actually send mail. With th...
I use a before_filter in the application controller.
This filter should be used for every controller except two actions in one controller.
How can I define this exception?
Thanks!
...
Hello,
How do I get a random record when using :group?
@paintings = Painting.all(:group => "user_id", :order => "created_at DESC")
This gives me the latest painting for each user. Now I would like to select a random painting from each user instead of the latest. The order of the paintings should still be the same, so that the user th...
environment.rb:
config.cache_store = :mem_cache_store, '127.0.0.1', { :namespace => RAILS_ENV.to_s }
development.rb:
config.action_controller.perform_caching = true
This is the memcached output when I call the url.
get development:views/127.0.0.1:3000/aktionen.xml sending key development:views/127.0.0.1:3000/aktionen.xml END set ...
Hi,
My RAILS_ROOT is /usr/local/www/application/
If I run 'rake db:migrate RAILS_ENV=production" from within the RAILS_ROOT it works fine.
However I can't seem to find a way to run the same command from outside the RAILS_ROOT.
Help is appreciated.
Many Thanks
...
I have to separate models: nested sections and articles, section has_many articles.
Both have path attribute like aaa/bbb/ccc, for example:
movies # section
movies/popular # section
movies/popular/matrix # article
movies/popular/matrix-reloaded # article
...
movies/ratings # article
about # article
...
In routes I have:
map.path '*pa...
Hi all,
In a project, I recently replaced a simple form-based file upload with SWFUpload. When SWFUpload returns a success, I generate a form to add tags to the uploaded asset.
I'd like to be able to test inputting data into the tags textbox, but to do that I (think I) need to fake out SWFUpload.
Has anyone done this in the past? I ...