I would like to add methods to my template through a Presenter, but some methods are shared among other presenters.
Ex: os métodos 'pode_ser_mostrado?', 'pode_ser_editado?', 'pode_ser_excluido?'
What is the best way, to create a base pres...
Assuming I have the Admin user, Admin has login_user , as system_user , this relation is polymorphic, since other types of users also have login_user .
When creating the Admin form, I should add the fields of login_us...
I'm starting with Rails, and I'm not able to create a link to delete a "post" from the site.
Follow the links new and edit
p.btn = link_to "Editar informações", edit_property_path(@property) if current_user == @property.user...
My application worked very well until today, but now when I start it it has this error:
error unefined method acts_as_authentic for main: Object
Here is my code for act_as_authentic in the user model:
acts_as_authentic do |c|...
How do I set the size of a field of type string in a migration? Ex:
class CreateRooms < ActiveRecord::Migration
def change
create_table :rooms do |t|
t.string :title
t.string :location
t.text :description
t.timestamps
end
end
end...
I'm doing a customer registration here for the store and it turns out that some customers have more than 2 phone numbers the system already works with two fixed and one mobile phone fields:
<%= f.label :telcelular , "Tel. Celular" %>
<...
I'm having trouble maintaining the style of a button by removing link_to and holding only the raw:
=link_to(raw("<span class='calsse'></span>"), rota)
To:
=raw("<span class='calsse'></span>")
When I do this the...